29 SetFrame({ 0.0f, 0.0f, 0.0f, 1.0f }, { 0.0f, 0.0f, -1.0f, 0.0f },
30 { 0.0f, 1.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f, 0.0f });
55 float const epsilon = 0.01f;
57 if (fabs(1.0
f - det) > epsilon)
59 #if defined(GTE_VALIDATE_COORDINATE_FRAME_ONCE) 70 if (fabs(1.0
f - lenD) > epsilon
71 || fabs(1.0
f - lenU) > epsilon
72 || fabs(1.0
f - lenR) > epsilon
73 || fabs(dotDU) > epsilon
74 || fabs(dotDR) > epsilon
75 || fabs(dotUR) > epsilon)
77 LogError(
"Coordinate frame is not orthonormal.");
84 Orthonormalize<4, float>(3,
v);
97 SetAxes(dVector, uVector, rVector);
179 #if defined(GTE_USE_MAT_VEC) 262 float invDDiff = 1.0f / (dMax - dMin);
263 float invUDiff = 1.0f / (uMax - uMin);
264 float invRDiff = 1.0f / (rMax - rMin);
268 #if defined(GTE_USE_MAT_VEC) 350 #if defined (GTE_USE_MAT_VEC) 439 #if defined(GTE_USE_MAT_VEC) 442 pvMatrix = mViewMatrix * pMatrix;
virtual void UpdatePVMatrix()
virtual void OnFrustumChange()
void SetFrame(Vector4< float > const &position, Vector4< float > const &dVector, Vector4< float > const &uVector, Vector4< float > const &rVector)
void SetPosition(Vector4< float > const &position)
Vector4< float > mPosition
void SetAxes(Vector4< float > const &dVector, Vector4< float > const &uVector, Vector4< float > const &rVector)
Matrix4x4< float > mInverseViewMatrix
Matrix4x4< float > mProjectionMatrix
bool mIsDepthRangeZeroOne
float mFrustum[VF_QUANTITY]
Vector4< float > mUVector
ViewVolume(bool isPerspective, bool isDepthRangeZeroToOne)
#define LogError(message)
Matrix4x4< float > mProjectionViewMatrix
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
Vector4< float > mDVector
bool mValidateCoordinateFrame
Real DotCross(Vector< N, Real > const &v0, Vector< N, Real > const &v1, Vector< N, Real > const &v2)
void GetFrame(Vector4< float > &position, Vector4< float > &dVector, Vector4< float > &uVector, Vector4< float > &rVector) const
DualQuaternion< Real > Length(DualQuaternion< Real > const &d, bool robust=false)
Matrix4x4< float > mViewMatrix
void GetAxes(Vector4< float > &dVector, Vector4< float > &uVector, Vector4< float > &rVector) const
Vector4< float > mRVector
float const * GetFrustum() const
virtual void OnFrameChange()
void SetFrustum(float dMin, float dMax, float uMin, float uMax, float rMin, float rMax)