7 #include "utility_northstar.h" 20 LoadOpticalData(
struct ns_eye *eye);
29 RenderUVToDisplayUV(
Vector3 inputUV);
32 RenderUVToDisplayUV(
Vector2 inputUV);
35 SolveDisplayUVToRenderUV(
Vector2 inputUV,
40 DisplayUVToRenderUVPreviousSeed(
Vector2 inputUV);
46 UpdateEyePosition(
const Vector3 pos)
48 eyePosition.x = pos.x;
49 eyePosition.y = pos.y;
50 eyePosition.z = pos.z;
56 return cameraProjection;
60 setiters(
int init,
int opt)
62 m_iniSolverIters = init;
63 m_optSolverIters = opt;
67 UpdateClipToWorld(
Matrix4x4 eyeRotationMatrix)
70 Matrix4x4::Translate(eyePosition) * eyeRotationMatrix;
75 eyeToWorld * cameraProjection.ComposeProjection().Inverse();
81 ViewportPointToRayDirection(
Vector2 UV,
91 clipToWorld.MultiplyPoint(tmp * 2.f) - cameraPosition;
93 float mag = dir.Magnitude();
99 float ellipseMinorAxis;
100 float ellipseMajorAxis;
110 int m_iniSolverIters;
111 int m_optSolverIters;
113 std::map<float, std::map<float, Vector2> > m_requestedUVs;
120 Vector3 v2Norm = (v2 / v2.Magnitude());
121 return v2Norm * Vector3::Dot(v1, v2Norm);
125 intersectLineSphere(
Vector3 Origin,
128 float SphereRadiusSqrd,
129 bool frontSide =
true)
131 Vector3 L = spherePos - Origin;
132 Vector3 offsetFromSphereCenterToRay = Project(L, Direction) - L;
133 return (offsetFromSphereCenterToRay.sqrMagnitude() <= SphereRadiusSqrd)
134 ? Vector3::Dot(L, Direction) -
135 (sqrt(SphereRadiusSqrd -
136 offsetFromSphereCenterToRay.sqrMagnitude()) *
137 (frontSide ? 1.f : -1.f))
145 float denom = Vector3::Dot((Vector3::Zero() - n), l);
146 if (denom > 1.4e-45f) {
148 float t = Vector3::Dot(p0l0, (Vector3::Zero() - n)) / denom;
Definition: utility_northstar.h:368
Distortion information about an eye parsed from the configuration file.
Definition: ns_hmd.h:99
Definition: utility_northstar.h:283
Definition: utility_northstar.h:703
Definition: utility_northstar.h:16
Definition: deformation_northstar.h:12