TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
iMath Struct Referenceabstract
Inheritance diagram for iMath:
iUnknown

Detailed Description

Math interface.

Remarks
The simple operations, +, -, *, /, ==, etc. are not implemented in this interface, they are expected to be implemented natively into the target language.

Standard.

virtual tF64 Sqrt (tF64 v) const =0
 Square root. More...
 
virtual tF64 Sin (tF64 v) const =0
 Sinus. More...
 
virtual tF64 Cos (tF64 v) const =0
 Cosinus. More...
 
virtual tF64 ASin (tF64 v) const =0
 Arc Sinus. More...
 
virtual tF64 ACos (tF64 v) const =0
 Arc Cosinus. More...
 
virtual tF64 Tan (tF64 v) const =0
 Tan. More...
 
virtual tF64 ATan (tF64 v) const =0
 Arc Tangent. More...
 
virtual tF64 ATan2 (tF64 x, tF64 y) const =0
 Arc Tangent 2. More...
 
virtual tF64 LogX (tF64 v, tF64 n) const =0
 Log base N. More...
 
virtual tF64 LogE (tF64 v) const =0
 Log base E. More...
 
virtual tF64 Log2 (tF64 v) const =0
 Log base 2. More...
 
virtual tF64 Log10 (tF64 v) const =0
 Log base 10. More...
 
virtual tF64 Pow (tF64 v, tF64 e) const =0
 Power. More...
 
virtual tF64 Floor (tF64 v) const =0
 Floor. More...
 
virtual tF64 Ceil (tF64 v) const =0
 Ceil. More...
 
virtual tF64 Exp (tF64 v) const =0
 Exponential. More...
 
virtual tF64 Abs (tF64 v) const =0
 Absolute value. More...
 
virtual tF64 ToRad (tF64 afDeg) const =0
 Convert degree to radian. More...
 
virtual tF64 ToDeg (tF64 afRad) const =0
 Convert radian to degree. More...
 
virtual tF64 Min (tF64 a, tF64 b) const =0
 Minimum between a and b. More...
 
virtual tF64 Min3 (tF64 a, tF64 b, tF64 c) const =0
 Minimum between a, b and c. More...
 
virtual tF64 Max (tF64 a, tF64 b) const =0
 Maximum between a and b. More...
 
virtual tF64 Max3 (tF64 a, tF64 b, tF64 c) const =0
 Maximum between a, b and c. More...
 
virtual tF64 Mid (tF64 a, tF64 b, tF64 c) const =0
 Middle value between a, b and c. More...
 
virtual tF64 Clamp (tF64 v, tF64 afMin, tF64 afMax) const =0
 Clamp the specified number between min and max. More...
 
virtual tF64 ClampZeroOne (tF64 a) const =0
 Clamp the specified number between zero and one. More...
 
virtual tF64 Lerp (tF64 a, tF64 b, tF64 f) const =0
 Linear interpolation between a and b. More...
 
virtual tF64 BlendIntoAccumulator (tF64 accumulator, tF64 newValue, tF64 smoothRate) const =0
 Blends new values into an accumulator to produce a smoothed time series. More...
 

Random numbers

virtual void RandSeed (tU32 ulSeed) const =0
 Randomize. More...
 
virtual tI32 RandInt () const =0
 Compute a random integer number. More...
 
virtual tI32 RandIntRange (tI32 aMin, tI32 aMax) const =0
 Compute a random integer number between a specified range. More...
 
virtual tF32 RandFloat () const =0
 Compute a random float number. More...
 
virtual tF32 RandFloatRange (tF32 afMin, tF32 afMax) const =0
 Compute a random float number between a specified range. More...
 
virtual tF32 RandNormal (tF32 sigma) const =0
 Compute a random number with a normal distribution. More...
 
virtual sVec3f RandomDirection (const sVec3f &vN) const =0
 Generates a random direction in the upper hemisphere. More...
 
virtual sVec3f RandomDirectionEx (const sVec3f &avN, tF32 afDeviAngle) const =0
 Generates a random direction in the upper hemisphere. More...
 
virtual sVec3f RotateRay (const sVec3f &avIn, const sVec3f &avN) const =0
 Rotates a ray to have avN as basis. More...
 
virtual tU32 RandColorA (tU8 aA) const =0
 Return a random color with a specified alpha. More...
 
virtual tU32 RandColorAf (tF32 aA) const =0
 Return a random 32 bit color with specified alpha. More...
 
virtual tU32 RandColor () const =0
 Return a random 32 bit color. More...
 

Vector 2D operations.

virtual sVec2f Vec2Add (const sVec2f &aLeft, const sVec2f &aRight) const =0
 Add. More...
 
virtual sVec2f Vec2Sub (const sVec2f &aLeft, const sVec2f &aRight) const =0
 Subtract. More...
 
virtual sVec2f Vec2Mul (const sVec2f &aLeft, const sVec2f &aRight) const =0
 Multiply. More...
 
virtual sVec2f Vec2Div (const sVec2f &aLeft, const sVec2f &aRight) const =0
 Divide. More...
 
virtual sVec2f Vec2Scale (const sVec2f &aLeft, tF32 afRight) const =0
 Scale. More...
 
virtual tI32 Vec2Compare (const sVec2f &aLeft, const sVec2f &aRight) const =0
 Compare. More...
 
virtual tF32 Vec2Length (const sVec2f &aV) const =0
 Length. More...
 
virtual tF32 Vec2LengthSq (const sVec2f &aV) const =0
 Length squared. More...
 
virtual sVec2f Vec2Normalize (const sVec2f &aV) const =0
 Normalize. More...
 
virtual tBool Vec2IsNormal (const sVec2f &aV) const =0
 Return eTrue if it's a normal vector. More...
 
virtual tF32 Vec2Dot (const sVec2f &aLeft, const sVec2f &aRight) const =0
 Dot product. More...
 
virtual sVec2f Vec2Lerp (const sVec2f &aLeft, const sVec2f &aRight, tF32 afF) const =0
 Lerp. More...
 
virtual sVec2f Vec2Lerp2 (const sVec2f &aLeft, const sVec2f &aRight, const sVec2f &aF) const =0
 Lerp. More...
 
virtual sVec2f Vec2BlendIntoAccumulator (const sVec2f &accumulator, const sVec2f &newValue, tF32 smoothRate) const =0
 Blends new values into an accumulator to produce a smoothed time series. More...
 
virtual sVec2f Vec2Abs (const sVec2f &aV) const =0
 Abs. More...
 
virtual sVec2f Vec2Min (const sVec2f &aLeft, const sVec2f &aRight) const =0
 Min. More...
 
virtual sVec2f Vec2Max (const sVec2f &aLeft, const sVec2f &aRight) const =0
 Max. More...
 
virtual sVec2f Vec2CatmullRom (const sVec2f &V1, const sVec2f &V2, const sVec2f &V3, const sVec2f &V4, tF32 s) const =0
 CatmullRom spline. More...
 
virtual sVec2f Vec2Hermite (const sVec2f &V1, const sVec2f &V2, const sVec2f &V3, const sVec2f &V4, tF32 s) const =0
 Hermite spline. More...
 
virtual sVec2f Vec2BaryCentric (const sVec2f &V1, const sVec2f &V2, const sVec2f &V3, tF32 u, tF32 v) const =0
 BaryCentric. More...
 
virtual sVec4f Vec2Transform (const sVec2f &aVec, const sMatrixf &aMatrix) const =0
 Transform by the specified matrix. More...
 
virtual sVec2f Vec2TransformCoord (const sVec2f &aVec, const sMatrixf &aMatrix) const =0
 Transform by the specified matrix. More...
 
virtual sVec2f Vec2TransformNormal (const sVec2f &aVec, const sMatrixf &aMatrix) const =0
 Transform by the specified matrix. More...
 
virtual void Vec2TransformCoordArray (tVec2fCVec *apVecs, const sMatrixf &aMatrix) const =0
 Transform an array by the specified matrix. More...
 
virtual void Vec2TransformNormalArray (tVec2fCVec *apVecs, const sMatrixf &aMatrix) const =0
 Transform an array by the specified matrix. More...
 

Vector 3D operations.

virtual sVec3f Vec3Add (const sVec3f &aLeft, const sVec3f &aRight) const =0
 Add. More...
 
virtual sVec3f Vec3Sub (const sVec3f &aLeft, const sVec3f &aRight) const =0
 Subtract. More...
 
virtual sVec3f Vec3Mul (const sVec3f &aLeft, const sVec3f &aRight) const =0
 Multiply. More...
 
virtual sVec3f Vec3Div (const sVec3f &aLeft, const sVec3f &aRight) const =0
 Divide. More...
 
virtual sVec3f Vec3Scale (const sVec3f &aLeft, tF32 afRight) const =0
 Scale. More...
 
virtual tI32 Vec3Compare (const sVec3f &aLeft, const sVec3f &aRight) const =0
 Compare. More...
 
virtual tF32 Vec3Length (const sVec3f &aV) const =0
 Length. More...
 
virtual tF32 Vec3LengthSq (const sVec3f &aV) const =0
 Length squared. More...
 
virtual sVec3f Vec3Normalize (const sVec3f &aV) const =0
 Normalize. More...
 
virtual tBool Vec3IsNormal (const sVec3f &aV) const =0
 Return eTrue if it's a normal vector. More...
 
virtual tF32 Vec3Dot (const sVec3f &aLeft, const sVec3f &aRight) const =0
 Dot product. More...
 
virtual sVec3f Vec3Cross (const sVec3f &aLeft, const sVec3f &aRight) const =0
 Cross product. More...
 
virtual sVec3f Vec3Lerp (const sVec3f &aLeft, const sVec3f &aRight, tF32 afF) const =0
 Lerp. More...
 
virtual sVec3f Vec3Lerp2 (const sVec3f &aLeft, const sVec3f &aRight, const sVec3f &aF) const =0
 Lerp. More...
 
virtual sVec3f Vec3BlendIntoAccumulator (const sVec3f &accumulator, const sVec3f &newValue, tF32 smoothRate) const =0
 Blends new values into an accumulator to produce a smoothed time series. More...
 
virtual sVec3f Vec3Abs (const sVec3f &aV) const =0
 Abs. More...
 
virtual sVec3f Vec3Min (const sVec3f &aLeft, const sVec3f &aRight) const =0
 Min. More...
 
virtual sVec3f Vec3Max (const sVec3f &aLeft, const sVec3f &aRight) const =0
 Max. More...
 
virtual sVec3f Vec3CatmullRom (const sVec3f &V1, const sVec3f &V2, const sVec3f &V3, const sVec3f &V4, tF32 s) const =0
 CatmullRom spline. More...
 
virtual sVec3f Vec3Hermite (const sVec3f &V1, const sVec3f &V2, const sVec3f &V3, const sVec3f &V4, tF32 s) const =0
 Hermite spline. More...
 
virtual sVec3f Vec3BaryCentric (const sVec3f &V1, const sVec3f &V2, const sVec3f &V3, tF32 u, tF32 v) const =0
 BaryCentric. More...
 
virtual sVec4f Vec3Transform (const sVec3f &aVec, const sMatrixf &aMatrix) const =0
 Transform by the specified matrix. More...
 
virtual sVec3f Vec3TransformCoord (const sVec3f &aVec, const sMatrixf &aMatrix) const =0
 Transform by the specified matrix. More...
 
virtual sVec3f Vec3TransformNormal (const sVec3f &aVec, const sMatrixf &aMatrix) const =0
 Transform by the specified matrix. More...
 
virtual void Vec3TransformCoordArray (tVec3fCVec *apVecs, const sMatrixf &aMatrix) const =0
 Transform an array by the specified matrix. More...
 
virtual void Vec3TransformNormalArray (tVec3fCVec *apVecs, const sMatrixf &aMatrix) const =0
 Transform an array by the specified matrix. More...
 
virtual sVec3f Vec3Unproject (const sVec3f &avIn, const sRectf &aVP, const sMatrixf &amtxViewProj) const =0
 Unproject a vector. More...
 
virtual sVec3f Vec3Project (const sVec3f &avPos, const sMatrixf &amtxWVP, const sRectf &aRect) const =0
 Project a vector. More...
 
virtual sVec4f Vec3ProjectRHW (const sVec3f &avPos, const sMatrixf &amtxWVP, const sRectf &aRect) const =0
 Project a vector. More...
 
virtual sVec3f Vec3Reflect (const sVec3f &Dir, const sVec3f &Normal) const =0
 Returns a vector reflected about the plane indicated by the specified normal. More...
 

Vector 4D operations.

virtual sVec4f Vec4Add (const sVec4f &aLeft, const sVec4f &aRight) const =0
 Add. More...
 
virtual sVec4f Vec4Sub (const sVec4f &aLeft, const sVec4f &aRight) const =0
 Subtract. More...
 
virtual sVec4f Vec4Mul (const sVec4f &aLeft, const sVec4f &aRight) const =0
 Multiply. More...
 
virtual sVec4f Vec4Div (const sVec4f &aLeft, const sVec4f &aRight) const =0
 Divide. More...
 
virtual sVec4f Vec4Scale (const sVec4f &aLeft, tF32 afRight) const =0
 Scale. More...
 
virtual tI32 Vec4Compare (const sVec4f &aLeft, const sVec4f &aRight) const =0
 Compare. More...
 
virtual tF32 Vec4Length (const sVec4f &aV) const =0
 Length. More...
 
virtual tF32 Vec4LengthSq (const sVec4f &aV) const =0
 Length squared. More...
 
virtual sVec4f Vec4Normalize (const sVec4f &aV) const =0
 Normalize. More...
 
virtual tBool Vec4IsNormal (const sVec4f &aV) const =0
 Return eTrue if it's a normal vector. More...
 
virtual tF32 Vec4Dot (const sVec4f &aLeft, const sVec4f &aRight) const =0
 Dot product. More...
 
virtual sVec4f Vec4Cross (const sVec4f &aA, const sVec4f &aB, const sVec4f &aC) const =0
 Cross product. More...
 
virtual sVec4f Vec4Lerp (const sVec4f &aLeft, const sVec4f &aRight, tF32 afF) const =0
 Lerp. More...
 
virtual sVec4f Vec4Lerp2 (const sVec4f &aLeft, const sVec4f &aRight, const sVec4f &aF) const =0
 Lerp. More...
 
virtual sVec4f Vec4BlendIntoAccumulator (const sVec4f &accumulator, const sVec4f &newValue, tF32 smoothRate) const =0
 Blends new values into an accumulator to produce a smoothed time series. More...
 
virtual sVec4f Vec4Abs (const sVec4f &aV) const =0
 Abs. More...
 
virtual sVec4f Vec4Min (const sVec4f &aLeft, const sVec4f &aRight) const =0
 Min. More...
 
virtual sVec4f Vec4Max (const sVec4f &aLeft, const sVec4f &aRight) const =0
 Max. More...
 
virtual sVec4f Vec4CatmullRom (const sVec4f &V1, const sVec4f &V2, const sVec4f &V3, const sVec4f &V4, tF32 s) const =0
 CatmullRom spline. More...
 
virtual sVec4f Vec4Hermite (const sVec4f &V1, const sVec4f &V2, const sVec4f &V3, const sVec4f &V4, tF32 s) const =0
 Hermite spline. More...
 
virtual sVec4f Vec4BaryCentric (const sVec4f &V1, const sVec4f &V2, const sVec4f &V3, tF32 u, tF32 v) const =0
 BaryCentric. More...
 
virtual sVec4f Vec4Transform (const sVec4f &aVec, const sMatrixf &aMatrix) const =0
 Transform by the specified matrix. More...
 
virtual void Vec4TransformArray (tVec4fCVec *apVecs, const sMatrixf &aMatrix) const =0
 Transform an array by the specified matrix. More...
 

Matrix operations.

virtual sMatrixf MatrixIdentity () const =0
 Get the identity matrix. More...
 
virtual tBool MatrixIsIdentity (const sMatrixf &M) const =0
 Check if a matrix is identity. More...
 
virtual sMatrixf MatrixAdd (const sMatrixf &aLeft, const sMatrixf &aRight) const =0
 Add. More...
 
virtual sMatrixf MatrixSub (const sMatrixf &aLeft, const sMatrixf &aRight) const =0
 Subtract. More...
 
virtual sMatrixf MatrixScale (const sMatrixf &aLeft, tF32 afRight) const =0
 Scale. More...
 
virtual sMatrixf MatrixLerp (const sMatrixf &A, const sMatrixf &B, tF32 fFac) const =0
 Lerp. More...
 
virtual tI32 MatrixCompare (const sMatrixf &aLeft, const sMatrixf &aRight) const =0
 Compare. More...
 
virtual sMatrixf MatrixMultiply (const sMatrixf &M1, const sMatrixf &M2) const =0
 Multiply two matrix. More...
 
virtual tF32 MatrixDeterminant2 (const sMatrixf &M) const =0
 Compute the top left 2x2 matrix determinant. More...
 
virtual tF32 MatrixDeterminant3 (const sMatrixf &M) const =0
 Compute the top left 3x3 matrix determinant. More...
 
virtual tF32 MatrixDeterminant (const sMatrixf &M) const =0
 Compute matrix determinant. More...
 
virtual tF32 MatrixGetHandeness (const sMatrixf &M) const =0
 Compute matrix handeness. More...
 
virtual sMatrixf MatrixInverse (const sMatrixf &M) const =0
 Inverse the given matrix. More...
 
virtual sMatrixf MatrixTransformInverse (const sMatrixf &M) const =0
 Inverse the transformation part. Means transpose the rotation and negate the translation. More...
 
virtual sMatrixf MatrixLookAtRH (const sVec3f &Eye, const sVec3f &At, const sVec3f &Up) const =0
 Make a right handed look at matrix. More...
 
virtual sMatrixf MatrixLookAtLH (const sVec3f &Eye, const sVec3f &At, const sVec3f &Up) const =0
 Make a left handed look at matrix. More...
 
virtual sMatrixf MatrixOrthoRH (tF32 w, tF32 h, tF32 zn, tF32 zf) const =0
 Make a right handed orthogonal projection matrix. More...
 
virtual sMatrixf MatrixOrthoLH (tF32 w, tF32 h, tF32 zn, tF32 zf) const =0
 Make a left handed orthogonal projection matrix. More...
 
virtual sMatrixf MatrixOrthoOffCenterRH (tF32 l, tF32 r, tF32 t, tF32 b, tF32 zn, tF32 zf) const =0
 Make a right handed orthogonal projection matrix. More...
 
virtual sMatrixf MatrixOrthoOffCenterLH (tF32 l, tF32 r, tF32 t, tF32 b, tF32 zn, tF32 zf) const =0
 Make a left handed orthogonal projection matrix. More...
 
virtual sMatrixf MatrixPerspectiveRH (tF32 w, tF32 h, tF32 zn, tF32 zf) const =0
 Make a right handed perspective projection matrix. More...
 
virtual sMatrixf MatrixPerspectiveLH (tF32 w, tF32 h, tF32 zn, tF32 zf) const =0
 Make a left handed perspective projection matrix. More...
 
virtual sMatrixf MatrixPerspectiveFovRH (tF32 fovy, tF32 aspect, tF32 zn, tF32 zf) const =0
 Make a right handed perspective projection matrix. More...
 
virtual sMatrixf MatrixPerspectiveFovLH (tF32 fovy, tF32 aspect, tF32 zn, tF32 zf) const =0
 Make a left handed perspective projection matrix. More...
 
virtual sMatrixf MatrixPerspectiveOffCenterRH (tF32 l, tF32 r, tF32 t, tF32 b, tF32 zn, tF32 zf) const =0
 Make a right handed perspective projection matrix. More...
 
virtual sMatrixf MatrixPerspectiveOffCenterLH (tF32 l, tF32 r, tF32 t, tF32 b, tF32 zn, tF32 zf) const =0
 Make a left handed perspective projection matrix. More...
 
virtual sMatrixf MatrixReflect (const sPlanef &Plane) const =0
 Make a reflection matrix. More...
 
virtual sMatrixf MatrixRotationAxis (const sVec3f &V, tF32 angle) const =0
 Make a rotation matrix. More...
 
virtual sMatrixf MatrixRotationQuat (const sQuatf &Q) const =0
 Make a rotation matrix. More...
 
virtual sMatrixf MatrixRotationX (tF32 angle) const =0
 Make a rotation matrix. More...
 
virtual sMatrixf MatrixRotationY (tF32 angle) const =0
 Make a rotation matrix. More...
 
virtual sMatrixf MatrixRotationZ (tF32 angle) const =0
 Make a rotation matrix. More...
 
virtual sMatrixf MatrixRotationYawPitchRoll (tF32 yaw, tF32 pitch, tF32 roll) const =0
 Make a rotation matrix. More...
 
virtual sVec3f MatrixDecomposeYawPitchRoll (const sMatrixf &M) const =0
 Extract the rotation contained in the provided matrix as yaw/heading/Y, pitch/X and roll/bank/Z in radians. More...
 
virtual sMatrixf MatrixScaling (const sVec3f &V) const =0
 Make a scaling matrix. More...
 
virtual sMatrixf MatrixVecScale (const sMatrixf &M, const sVec3f &V) const =0
 Scale a matrix. More...
 
virtual sMatrixf MatrixShadow (const sVec4f &vLight, const sPlanef &Plane) const =0
 Make a shadow projection matrix. More...
 
virtual sMatrixf MatrixTranslation (const sVec3f &V) const =0
 Make a translation matrix. More...
 
virtual sMatrixf MatrixTranspose (const sMatrixf &M) const =0
 Transpose a matrix. More...
 
virtual sMatrixf MatrixTranspose3x3 (const sMatrixf &M) const =0
 Transpose a matrix. More...
 
virtual sMatrixf MatrixTextureOffset (tF32 fBias, tI32 nTexW, tI32 nTexH)=0
 Texture offset matrix. More...
 
virtual sMatrixf MatrixTextureOffset2 (tF32 fBias, tI32 nTexW, tI32 nTexH, tI32 nDepthBits)=0
 Texture offset matrix that takes in account a bit depth. More...
 
virtual sVec3f MatrixGetForward (const sMatrixf &M) const =0
 Get the forward vector of a matrix. More...
 
virtual sVec3f MatrixGetUp (const sMatrixf &M) const =0
 Get the up vector of a matrix. More...
 
virtual sVec3f MatrixGetRight (const sMatrixf &M) const =0
 Get the right vector of a matrix. More...
 
virtual sVec3f MatrixGetTranslation (const sMatrixf &M) const =0
 Get the translation vector of a matrix. More...
 
virtual sMatrixf MatrixSetForward (const sMatrixf &M, const sVec3f &V) const =0
 Set the forward vector of a matrix. More...
 
virtual sMatrixf MatrixSetUp (const sMatrixf &M, const sVec3f &V) const =0
 Set the up vector of a matrix. More...
 
virtual sMatrixf MatrixSetRight (const sMatrixf &M, const sVec3f &V) const =0
 Set the right vector of a matrix. More...
 
virtual sMatrixf MatrixSetTranslation (const sMatrixf &M, const sVec3f &V) const =0
 Set the translation vector of a matrix. More...
 
virtual tBool MatrixIsNormal (const sMatrixf &M) const =0
 Check if a matrix is normalized. More...
 
virtual tBool MatrixIsOrthogonal (const sMatrixf &M) const =0
 Check if a matrix is orthogonal. More...
 
virtual tBool MatrixIsOrthoNormal (const sMatrixf &M) const =0
 Check if a matrix is orthonormal. More...
 
virtual sMatrixf MatrixSetRotation (const sMatrixf &In, const sMatrixf &RotM) const =0
 Set the rotation part of a matrix. More...
 
virtual sVec3f MatrixToEuler (const sMatrixf &M) const =0
 Get euler angles from a rotation matrix. More...
 
virtual sMatrixf MatrixToCoordinateSystem (const sVec3f &avRight, const sVec3f &avUp, const sVec3f &avFwd, const sVec3f &avOrg) const =0
 Make a coordinate system conversion matrix. More...
 
virtual sVec3f MatrixGetProjectedTranslation (const sMatrixf &In) const =0
 Get the translation by 'unprojecting' the translation from the matrix's axis (translation of inverse matrix). More...
 
virtual sMatrixf MatrixSetProjectedTranslation (const sMatrixf &In, const sVec3f &avT) const =0
 Set the translation by projecting it onto the matrix's axis. More...
 
virtual sMatrixf MatrixSetNotRotation (const sMatrixf &In, const sMatrixf &M) const =0
 Set the non-rotation part of the matrix. More...
 
virtual sMatrixf MatrixRotate (const sMatrixf &M1, const sMatrixf &M2) const =0
 Rotate the matrix, this affects only the 3x3 top-left rotation part of the matrix. More...
 
virtual sMatrixf MatrixViewport (const sVec4f &aVP, tF32 afMinZ, tF32 afMaxZ)=0
 Compute a viewport matrix. More...
 
virtual sMatrixf MatrixAdjustViewport (const sVec4f &aContextVP, const sVec4f &aVirtualVP, tF32 afMinZ, tF32 afMaxZ)=0
 Compute a matrix that will compensate the projection matrix to fit into a viewport which is different of the context/physical viewport. More...
 
virtual sVec3f MatrixDecomposeGetTranslation (const sMatrixf &aMatrix)=0
 Get the translation part of a matrix. More...
 
virtual sVec3f MatrixDecomposeGetZYX (const sMatrixf &aMatrix)=0
 Get the rotation part of a matrix as euler angle in the Z*Y*X rotation order. More...
 
virtual sQuatf MatrixDecomposeGetQ (const sMatrixf &aMatrix)=0
 Get the rotation part of a matrix as a quaternion. More...
 
virtual sVec4f MatrixDecomposeGetScale (const sMatrixf &aMatrix)=0
 Get the local scaling part of a matrix (x,y,z,handness) More...
 
virtual sMatrixf MatrixCompose (const sVec3f &aT, const sVec3f &aZYX, const sVec4f &aS)=0
 Build a matrix from a translation, zyx euler rotation and scale. More...
 
virtual sMatrixf MatrixComposeQ (const sVec3f &aT, const sQuatf &aQ, const sVec4f &aS)=0
 Build a matrix from a translation, rotation quaternion and scale. More...
 

Quat operations.

virtual sQuatf QuatIdentity () const =0
 Get the identity quaternion. More...
 
virtual tBool QuatIsIdentity (const sQuatf &Q) const =0
 Check if the quaternion is identity. More...
 
virtual sQuatf QuatAdd (const sQuatf &aLeft, const sQuatf &aRight) const =0
 Add. More...
 
virtual sQuatf QuatSub (const sQuatf &aLeft, const sQuatf &aRight) const =0
 Subtract. More...
 
virtual sQuatf QuatScale (const sQuatf &aLeft, tF32 afRight) const =0
 Scale. More...
 
virtual tI32 QuatCompare (const sQuatf &aLeft, const sQuatf &aRight) const =0
 Compare. More...
 
virtual sQuatf QuatBaryCentric (const sQuatf &Q1, const sQuatf &Q2, const sQuatf &Q3, tF32 f, tF32 g) const =0
 BaryCenter. More...
 
virtual sQuatf QuatConjugate (const sQuatf &Q) const =0
 Quat conjugate. More...
 
virtual tF32 QuatDot (const sQuatf &Q1, const sQuatf &Q2) const =0
 Quat dot. More...
 
virtual sQuatf QuatExp (const sQuatf &Q) const =0
 Quat exponentials. More...
 
virtual sQuatf QuatInverse (const sQuatf &Q) const =0
 Quat inverse. More...
 
virtual tF32 QuatLength (const sQuatf &Q) const =0
 Quat length. More...
 
virtual tF32 QuatLengthSq (const sQuatf &Q) const =0
 Quat length squared. More...
 
virtual sQuatf QuatLn (const sQuatf &Q) const =0
 Calculates the natural logarithm. More...
 
virtual sQuatf QuatMultiply (const sQuatf &Q1, const sQuatf &Q2) const =0
 Quat multiply. More...
 
virtual sQuatf QuatNormalize (const sQuatf &Q) const =0
 Quat normalize. More...
 
virtual sQuatf QuatRotationAxis (const sVec3f &V, tF32 angle) const =0
 Rotation quaternion. More...
 
virtual sQuatf QuatRotationX (tF32 angle) const =0
 Rotation quaternion. More...
 
virtual sQuatf QuatRotationY (tF32 angle) const =0
 Rotation quaternion. More...
 
virtual sQuatf QuatRotationZ (tF32 angle) const =0
 Rotation quaternion. More...
 
virtual sQuatf QuatRotationXYZ (const sVec3f &V) const =0
 Rotation quaternion. More...
 
virtual sQuatf QuatRotationMatrix (const sMatrixf &M) const =0
 Rotation quaternion. More...
 
virtual sQuatf QuatRotationYawPitchRoll (const tF32 yaw, const tF32 pitch, const tF32 roll) const =0
 Rotation quaternion. More...
 
virtual sQuatf QuatRotationVector (const sVec3f &vFrom, const sVec3f &vTo) const =0
 Rotation quaternion. More...
 
virtual sQuatf QuatSlerp (const sQuatf &Q1, const sQuatf &Q2, tF32 t, eQuatSlerp mode) const =0
 Quat slerp. More...
 
virtual sQuatf QuatSquad (const sQuatf &Q1, const sQuatf &Q2, const sQuatf &Q3, const sQuatf &Q4, tF32 t) const =0
 Quat squad. More...
 
virtual sVec4f QuatToAxisAngle (const sQuatf &Q) const =0
 Quat to axis angle. More...
 
virtual sVec3f QuatToEuler (const sQuatf &Q) const =0
 Quat to euler. More...
 

Plane

virtual tF32 PlaneDot (const sPlanef &P, const sVec4f &V) const =0
 4D dot product between a plane and a 4d vector. More...
 
virtual tF32 PlaneDotCoord (const sPlanef &P, const sVec3f &V) const =0
 4D dot product between a plane and a 3d vector (w is assumed 1). More...
 
virtual tF32 PlaneDotNormal (const sPlanef &P, const sVec3f &V) const =0
 3D dot product between a plane and a 3d vector. More...
 
virtual tF32 PlaneDistance (const sPlanef &P, const sVec3f &V) const =0
 Distance between a plane and the specified point. More...
 
virtual sPlanef PlaneFromPointNormal (const sVec3f &vPoint, const sVec3f &vNormal) const =0
 Construct a plane from a point and a normal. More...
 
virtual sPlanef PlaneFromPoints (const sVec3f &V1, const sVec3f &V2, const sVec3f &V3) const =0
 Construct a plane from three points. More...
 
virtual sVec4f PlaneIntersectLine (const sPlanef &P, const sVec3f &V1, const sVec3f &V2) const =0
 Compute the intersection between a plane and a line. More...
 
virtual sVec4f PlaneIntersectRay (const sPlanef &P, const sVec3f &avRayPos, const sVec3f &avRayDir) const =0
 Compute the intersection between a plane and a ray. More...
 
virtual sPlanef PlaneNormalize (const sPlanef &P) const =0
 Normalize the specified plane. More...
 
virtual sPlanef PlaneTransform (const sPlanef &P, const sMatrixf &M) const =0
 Transform the plane by the specified matrix. More...
 
virtual sPlanef PlaneTransformInversedMatrix (const sPlanef &P, const sMatrixf &M) const =0
 Transform the plane by the inverse of the specified matrix. More...
 
virtual sVec3f PlaneIntersection (const sPlanef &PA, const sPlanef &PB, const sPlanef &PC) const =0
 Get the intersection point between 3d planes. More...
 
virtual sVec3f PlaneClosest (const sPlanef &P, const sVec3f &A) const =0
 Get the closest point on the plane to the specified vector. More...
 
virtual ePlaneType PlaneType (const sPlanef &Plane) const =0
 Get the type of plane. More...
 
virtual ePlaneType PlaneMaxType (const sPlanef &Plane) const =0
 Get the type of plane's maximum component. More...
 
virtual sMatrixf PlaneExtractCoordinateSystem (const sPlanef &Plane, const sVec3f &avFwdDir) const =0
 Extract a coordinate system from the plane. More...
 
virtual tBool PlaneIntersectSphere (const sPlanef &plane, const sVec3f &avCenter, const tF32 afRadius) const =0
 Check if the specified sphere intersect the specified plane. More...
 

Triangles

virtual sVec4f TriangleAreaNormal (const sVec3f &V0, const sVec3f &V1, const sVec3f &V2) const =0
 Compute the normal and area of a triangle. More...
 
virtual tBool TriangleIsDegenerate (const sVec3f &V0, const sVec3f &V1, const sVec3f &V2) const =0
 Check whether the triangle is degenerated. More...
 
virtual tBool TriangleIntersectTriangle (const sVec3f &V0, const sVec3f &V1, const sVec3f &V2, const sVec3f &U0, const sVec3f &U1, const sVec3f &U2) const =0
 Check triangle-triangle intersection. More...
 
virtual sVec3f TriangleIntersectRay (const sVec3f &avOrigin, const sVec3f &avDir, const sVec3f &V0, const sVec3f &V1, const sVec3f &V2) const =0
 Check triangle-ray intersection. More...
 
virtual sVec3f TriangleIntersectRayCull (const sVec3f &avOrigin, const sVec3f &avDir, const sVec3f &V0, const sVec3f &V1, const sVec3f &V2) const =0
 Check triangle-ray intersection with culling. More...
 
virtual tBool TriangleIntersectAABB (const sVec3f &V0, const sVec3f &V1, const sVec3f &V2, const sVec3f &avMin, const sVec3f &avMax) const =0
 Check triangle-aabb intersection. More...
 
virtual sVec3f TriangleBaryCentric (const sVec3f &A, const sVec3f &B, const sVec3f &C, const sVec3f &P) const =0
 Compute the barycentric coordinates of the specified point. More...
 

Utils

virtual tF32 WrapFloat (tF32 aX, tF32 aMin, tF32 aMax) const =0
 Wrap a floating value between the specified min and max values. More...
 
virtual tI32 WrapInt (tI32 aX, tI32 aMin, tI32 aMax) const =0
 Wrap an integer value between the specified min and max values. More...
 
virtual tF32 WrapRad (tF32 aX) const =0
 Wrap a radian between 0 and 2pi. More...
 
virtual tF32 WrapRad2 (tF32 aX) const =0
 Wrap a radian between -pi and pi. More...
 
virtual tF32 GetAngleFromPoints2D (const sVec2f &aStartPos, const sVec2f &aGoalPos) const =0
 Get the angle between two 2d vectors, returns an angle in [0;2pi]. More...
 
virtual sVec2f GetAngleFromPoints3D (const sVec3f &aStartPos, const sVec3f &aGoalPos) const =0
 Get the angles between two 3d vectors. More...
 
virtual eClassify ClassifyPoint (const sPlanef &plane, const sVec3f &point) const =0
 Check whether a point is in-front, behind or on a plane. More...
 
virtual tBool IsPointInsideEdge (const sVec3f &A, const sVec3f &B, const sVec3f &P) const =0
 Check whether a point is on the specified edge. More...
 
virtual sVec3f ClosestPointOnLine (const sVec3f &A, const sVec3f &B, const sVec3f &P) const =0
 Return the closest point to the specified vector P on the specified AB line. More...
 
virtual sVec3f ClosestPointOnTriangle (const sVec3f &A, const sVec3f &B, const sVec3f &C, const sVec3f &P) const =0
 Return the closest point to the specified vector P on the specified ABC triangle. More...
 
virtual tF32 GetAngularDifference (tF32 afA, tF32 afB) const =0
 Get the shortest 'distance' (angular difference) between two angles, no matter if the angles are in the [0;pi][-0;-pi] range or the [0;2pi] range. More...
 
virtual sVec3f GetScreenPosition (const sVec3f &avPos, const sMatrixf &mtxVP, const sRectf &aRect) const =0
 Get the screen position of the specified 3d world position. More...
 
virtual sVec3f Vec3SphericalToCartesian (const sVec3f &avS) const =0
 Convert a 3d spherical coordinate to a 3d cartesian coordinate. More...
 
virtual sVec3f Vec3CartesianToSpherical (const sVec3f &avC) const =0
 Convert a 3d cartesian coordinate to a 3d spherical coordinate. More...
 
virtual sVec3f Vec3OrbitPitch (const sVec3f &aTarget, const sVec3f &aPos, tF32 afPitch) const =0
 Orbit/rotate a 3d position of the specified yaw (Y-axis) angle around the specified target. More...
 
virtual sVec3f Vec3OrbitYaw (const sVec3f &aTarget, const sVec3f &aPos, tF32 afYaw) const =0
 Orbit/rotate a 3d position of the specified pitch (X-axis) angle around the specified target. More...
 
virtual sVec3f Vec3OrbitYawPitch (const sVec3f &aTarget, const sVec3f &aPos, tF32 afYaw, tF32 afPitch) const =0
 Orbit/rotate a 3d position of the specified yaw (Y-axis) and then pitch (X-axis) angle around the specified target. More...
 
virtual tF32 ComputePixelScaleX (const sVec3f &aPos, const sMatrixf &amtxWorldView, const sMatrixf &amtxProj, const sRectf &aVP) const =0
 Compute a pixel to world unit scale value, based on the X-axis delta. More...
 
virtual tF32 ComputePixelScaleY (const sVec3f &aPos, const sMatrixf &amtxWorldView, const sMatrixf &amtxProj, const sRectf &aVP) const =0
 Compute a pixel to world unit scale value, based on the Y-axis delta. More...
 
virtual tF32 ComputePixelWorldSizeX (const tF32 afPixelSize, const sVec3f &avPos, const sMatrixf &mtxWorldView, const sMatrixf &mtxProj, const sRectf &aVP) const =0
 Compute the world size of the given pixel size, scale based on the X-axis delta. More...
 
virtual tF32 ComputePixelWorldSizeY (const tF32 afPixelSize, const sVec3f &avPos, const sMatrixf &mtxWorldView, const sMatrixf &mtxProj, const sRectf &aVP) const =0
 Compute the world size of the given pixel size, scale based on the Y-axis delta. More...
 
virtual sVec2f ComputePixelWorldSizeVec2 (const tF32 afPixelSize, const sVec3f &avPos, const sMatrixf &mtxWorldView, const sMatrixf &mtxProj, const sRectf &aVP) const =0
 Compute the world size of the given pixel size, scale based on the X and Y axis delta. More...
 
virtual tF32 ComputePixelWorldSize (const tF32 afPixelSize, const sVec3f &avPos, const sMatrixf &amtxWorldView, const sMatrixf &amtxProj, const sRectf &aVP) const =0
 Compute the world size of the give pixel size, scale based on the axis with the highest resolution. More...
 
virtual tF32 Det2x2f (const tF32 a, const tF32 b, const tF32 c, const tF32 d) const =0
 Computes a 2x2 matrix determinant. More...
 
virtual tF32 Det3x3f (const tF32 a0, const tF32 a1, const tF32 a2, const tF32 a3, const tF32 a4, const tF32 a5, const tF32 a6, const tF32 a7, const tF32 a8) const =0
 Computes a 3x3 matrix determinant. More...
 
virtual tF32 Det4x4f (const tF32 a0, const tF32 a1, const tF32 a2, const tF32 a3, const tF32 a4, const tF32 a5, const tF32 a6, const tF32 a7, const tF32 a8, const tF32 a9, const tF32 a10, const tF32 a11, const tF32 a12, const tF32 a13, const tF32 a14, const tF32 a15) const =0
 Computes a 4x4 matrix determinant. More...
 
virtual tF64 Det2x2d (const tF64 a, const tF64 b, const tF64 c, const tF64 d) const =0
 Computes a 2x2 matrix determinant. More...
 
virtual tF64 Det3x3d (const tF64 a0, const tF64 a1, const tF64 a2, const tF64 a3, const tF64 a4, const tF64 a5, const tF64 a6, const tF64 a7, const tF64 a8) const =0
 Computes a 3x3 matrix determinant. More...
 
virtual tF64 Det4x4d (const tF64 a0, const tF64 a1, const tF64 a2, const tF64 a3, const tF64 a4, const tF64 a5, const tF64 a6, const tF64 a7, const tF64 a8, const tF64 a9, const tF64 a10, const tF64 a11, const tF64 a12, const tF64 a13, const tF64 a14, const tF64 a15) const =0
 Computes a 4x4 matrix determinant. More...
 
virtual tF32 FovHzToVt (tF32 afHFov, tF32 afWbyHAspect) const =0
 Convert an horizontal fov to a vertical fov. More...
 
virtual tF32 FovVtToHz (tF32 afVFov, tF32 afWbyHAspect) const =0
 Convert a vertical fov to an horizontal fov. More...
 

Curves

virtual tF64 ClampT (tF64 aX, tF64 aMin, tF64 aMax) const =0
 
virtual tF64 RepeatT (tF64 aX, tF64 aMin, tF64 aMax) const =0
 
virtual tF64 MirrorT (tF64 aX, tF64 aMin, tF64 aMax) const =0
 
virtual tF64 CycleT (tF64 aX, tF64 aMin, tF64 aMax) const =0
 
virtual tF64 CurveStep (tF64 a, tF64 b, tF64 t) const =0
 
virtual tF64 CurveLinear (tF64 V1, tF64 V2, tF64 s) const =0
 
virtual tF64 CurveCos (tF64 a, tF64 b, tF64 t) const =0
 
virtual tF64 CurveHermite (tF64 V1, tF64 T1, tF64 V2, tF64 T2, tF64 s) const =0
 
virtual tF64 CurveCatmullRom (tF64 V1, tF64 V2, tF64 V3, tF64 V4, tF64 s) const =0
 
virtual tF64 CurveCardinal (tF64 V1, tF64 V2, tF64 s, tF64 a) const =0
 
virtual tF64 CurveCardinal4 (tF64 V1, tF64 V2, tF64 V3, tF64 V4, tF64 s, tF64 a) const =0
 
virtual tF64 CycleLinear (tF64 aX, tF64 aMin, tF64 aMax) const =0
 
virtual tF64 CycleCos (tF64 aX, tF64 aMin, tF64 aMax) const =0
 
virtual tF64 CycleCardinal (tF64 aX, tF64 aMin, tF64 aMax, tF64 a) const =0
 

Probabilities

virtual tF64 ProbSum (tF64CVec *apProbs)=0
 
virtual tBool ProbNormalize (tF64CVec *apProbs)=0
 
virtual tBool ProbSampleBuildAliasMethodArrays (const tF64CVec *apProbs, tF64CVec *apAMQ, tU32CVec *apAMA)=0
 
virtual tBool ProbSampleAliasMethod (tU32CVec *apResults, const tF64CVec *apAMQ, const tU32CVec *apAMA)=0
 

Additional Inherited Members

- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual tF64 Sqrt ( tF64  v) const
pure virtual

Square root.

virtual tF64 Sin ( tF64  v) const
pure virtual

Sinus.

virtual tF64 Cos ( tF64  v) const
pure virtual

Cosinus.

virtual tF64 ASin ( tF64  v) const
pure virtual

Arc Sinus.

virtual tF64 ACos ( tF64  v) const
pure virtual

Arc Cosinus.

virtual tF64 Tan ( tF64  v) const
pure virtual

Tan.

virtual tF64 ATan ( tF64  v) const
pure virtual

Arc Tangent.

virtual tF64 ATan2 ( tF64  x,
tF64  y 
) const
pure virtual

Arc Tangent 2.

virtual tF64 LogX ( tF64  v,
tF64  n 
) const
pure virtual

Log base N.

virtual tF64 LogE ( tF64  v) const
pure virtual

Log base E.

virtual tF64 Log2 ( tF64  v) const
pure virtual

Log base 2.

virtual tF64 Log10 ( tF64  v) const
pure virtual

Log base 10.

virtual tF64 Pow ( tF64  v,
tF64  e 
) const
pure virtual

Power.

virtual tF64 Floor ( tF64  v) const
pure virtual

Floor.

virtual tF64 Ceil ( tF64  v) const
pure virtual

Ceil.

virtual tF64 Exp ( tF64  v) const
pure virtual

Exponential.

virtual tF64 Abs ( tF64  v) const
pure virtual

Absolute value.

virtual tF64 ToRad ( tF64  afDeg) const
pure virtual

Convert degree to radian.

virtual tF64 ToDeg ( tF64  afRad) const
pure virtual

Convert radian to degree.

virtual tF64 Min ( tF64  a,
tF64  b 
) const
pure virtual

Minimum between a and b.

virtual tF64 Min3 ( tF64  a,
tF64  b,
tF64  c 
) const
pure virtual

Minimum between a, b and c.

virtual tF64 Max ( tF64  a,
tF64  b 
) const
pure virtual

Maximum between a and b.

virtual tF64 Max3 ( tF64  a,
tF64  b,
tF64  c 
) const
pure virtual

Maximum between a, b and c.

virtual tF64 Mid ( tF64  a,
tF64  b,
tF64  c 
) const
pure virtual

Middle value between a, b and c.

virtual tF64 Clamp ( tF64  v,
tF64  afMin,
tF64  afMax 
) const
pure virtual

Clamp the specified number between min and max.

virtual tF64 ClampZeroOne ( tF64  a) const
pure virtual

Clamp the specified number between zero and one.

virtual tF64 Lerp ( tF64  a,
tF64  b,
tF64  f 
) const
pure virtual

Linear interpolation between a and b.

Remarks
The formula used is a + ((b-a)*f).
virtual tF64 BlendIntoAccumulator ( tF64  accumulator,
tF64  newValue,
tF64  smoothRate 
) const
pure virtual

Blends new values into an accumulator to produce a smoothed time series.

Parameters
accumulatoris the current value of the accumulator
newValueis the new value to accumulate
smoothRatetypically made proportional to "frameTime". If smoothRate is 0 the accumulator will not change, if smoothRate is 1 the accumulator is set to the new value (no smoothing), useful values are "near zero".
Returns
the new smoothed value of the accumulator
virtual void RandSeed ( tU32  ulSeed) const
pure virtual

Randomize.

virtual tI32 RandInt ( ) const
pure virtual

Compute a random integer number.

virtual tI32 RandIntRange ( tI32  aMin,
tI32  aMax 
) const
pure virtual

Compute a random integer number between a specified range.

virtual tF32 RandFloat ( ) const
pure virtual

Compute a random float number.

virtual tF32 RandFloatRange ( tF32  afMin,
tF32  afMax 
) const
pure virtual

Compute a random float number between a specified range.

virtual tF32 RandNormal ( tF32  sigma) const
pure virtual

Compute a random number with a normal distribution.

virtual sVec3f RandomDirection ( const sVec3f vN) const
pure virtual

Generates a random direction in the upper hemisphere.

Remarks
Where is the upper hemisphere is defined by the specified normal.
virtual sVec3f RandomDirectionEx ( const sVec3f avN,
tF32  afDeviAngle 
) const
pure virtual

Generates a random direction in the upper hemisphere.

Parameters
avNindicates the basis/direction of the hemisphere.
afDeviAnglerepresents the spreading range of the ray, 180deg (pi rad) will allow the ray to be spread away from -90, to 90 degrees, 90deg (pi/2 rad) will allow the ray to be spread away from -45 to 45 degrees, and so on...
Remarks
Where is the upper hemisphere is defined by the specified normal.
virtual sVec3f RotateRay ( const sVec3f avIn,
const sVec3f avN 
) const
pure virtual

Rotates a ray to have avN as basis.

virtual tU32 RandColorA ( tU8  aA) const
pure virtual

Return a random color with a specified alpha.

virtual tU32 RandColorAf ( tF32  aA) const
pure virtual

Return a random 32 bit color with specified alpha.

virtual tU32 RandColor ( ) const
pure virtual

Return a random 32 bit color.

virtual sVec2f Vec2Add ( const sVec2f aLeft,
const sVec2f aRight 
) const
pure virtual

Add.

virtual sVec2f Vec2Sub ( const sVec2f aLeft,
const sVec2f aRight 
) const
pure virtual

Subtract.

virtual sVec2f Vec2Mul ( const sVec2f aLeft,
const sVec2f aRight 
) const
pure virtual

Multiply.

virtual sVec2f Vec2Div ( const sVec2f aLeft,
const sVec2f aRight 
) const
pure virtual

Divide.

virtual sVec2f Vec2Scale ( const sVec2f aLeft,
tF32  afRight 
) const
pure virtual

Scale.

virtual tI32 Vec2Compare ( const sVec2f aLeft,
const sVec2f aRight 
) const
pure virtual

Compare.

virtual tF32 Vec2Length ( const sVec2f aV) const
pure virtual

Length.

virtual tF32 Vec2LengthSq ( const sVec2f aV) const
pure virtual

Length squared.

virtual sVec2f Vec2Normalize ( const sVec2f aV) const
pure virtual

Normalize.

virtual tBool Vec2IsNormal ( const sVec2f aV) const
pure virtual

Return eTrue if it's a normal vector.

virtual tF32 Vec2Dot ( const sVec2f aLeft,
const sVec2f aRight 
) const
pure virtual

Dot product.

virtual sVec2f Vec2Lerp ( const sVec2f aLeft,
const sVec2f aRight,
tF32  afF 
) const
pure virtual

Lerp.

virtual sVec2f Vec2Lerp2 ( const sVec2f aLeft,
const sVec2f aRight,
const sVec2f aF 
) const
pure virtual

Lerp.

virtual sVec2f Vec2BlendIntoAccumulator ( const sVec2f accumulator,
const sVec2f newValue,
tF32  smoothRate 
) const
pure virtual

Blends new values into an accumulator to produce a smoothed time series.

Parameters
accumulatoris the current value of the accumulator
newValueis the new value to accumulate
smoothRatetypically made proportional to "frameTime". If smoothRate is 0 the accumulator will not change, if smoothRate is 1 the accumulator is set to the new value (no smoothing), useful values are "near zero".
Returns
the new smoothed value of the accumulator
virtual sVec2f Vec2Abs ( const sVec2f aV) const
pure virtual

Abs.

virtual sVec2f Vec2Min ( const sVec2f aLeft,
const sVec2f aRight 
) const
pure virtual

Min.

virtual sVec2f Vec2Max ( const sVec2f aLeft,
const sVec2f aRight 
) const
pure virtual

Max.

virtual sVec2f Vec2CatmullRom ( const sVec2f V1,
const sVec2f V2,
const sVec2f V3,
const sVec2f V4,
tF32  s 
) const
pure virtual

CatmullRom spline.

virtual sVec2f Vec2Hermite ( const sVec2f V1,
const sVec2f V2,
const sVec2f V3,
const sVec2f V4,
tF32  s 
) const
pure virtual

Hermite spline.

virtual sVec2f Vec2BaryCentric ( const sVec2f V1,
const sVec2f V2,
const sVec2f V3,
tF32  u,
tF32  v 
) const
pure virtual

BaryCentric.

virtual sVec4f Vec2Transform ( const sVec2f aVec,
const sMatrixf aMatrix 
) const
pure virtual

Transform by the specified matrix.

virtual sVec2f Vec2TransformCoord ( const sVec2f aVec,
const sMatrixf aMatrix 
) const
pure virtual

Transform by the specified matrix.

virtual sVec2f Vec2TransformNormal ( const sVec2f aVec,
const sMatrixf aMatrix 
) const
pure virtual

Transform by the specified matrix.

virtual void Vec2TransformCoordArray ( tVec2fCVec apVecs,
const sMatrixf aMatrix 
) const
pure virtual

Transform an array by the specified matrix.

virtual void Vec2TransformNormalArray ( tVec2fCVec apVecs,
const sMatrixf aMatrix 
) const
pure virtual

Transform an array by the specified matrix.

virtual sVec3f Vec3Add ( const sVec3f aLeft,
const sVec3f aRight 
) const
pure virtual

Add.

virtual sVec3f Vec3Sub ( const sVec3f aLeft,
const sVec3f aRight 
) const
pure virtual

Subtract.

virtual sVec3f Vec3Mul ( const sVec3f aLeft,
const sVec3f aRight 
) const
pure virtual

Multiply.

virtual sVec3f Vec3Div ( const sVec3f aLeft,
const sVec3f aRight 
) const
pure virtual

Divide.

virtual sVec3f Vec3Scale ( const sVec3f aLeft,
tF32  afRight 
) const
pure virtual

Scale.

virtual tI32 Vec3Compare ( const sVec3f aLeft,
const sVec3f aRight 
) const
pure virtual

Compare.

virtual tF32 Vec3Length ( const sVec3f aV) const
pure virtual

Length.

virtual tF32 Vec3LengthSq ( const sVec3f aV) const
pure virtual

Length squared.

virtual sVec3f Vec3Normalize ( const sVec3f aV) const
pure virtual

Normalize.

virtual tBool Vec3IsNormal ( const sVec3f aV) const
pure virtual

Return eTrue if it's a normal vector.

virtual tF32 Vec3Dot ( const sVec3f aLeft,
const sVec3f aRight 
) const
pure virtual

Dot product.

virtual sVec3f Vec3Cross ( const sVec3f aLeft,
const sVec3f aRight 
) const
pure virtual

Cross product.

virtual sVec3f Vec3Lerp ( const sVec3f aLeft,
const sVec3f aRight,
tF32  afF 
) const
pure virtual

Lerp.

virtual sVec3f Vec3Lerp2 ( const sVec3f aLeft,
const sVec3f aRight,
const sVec3f aF 
) const
pure virtual

Lerp.

virtual sVec3f Vec3BlendIntoAccumulator ( const sVec3f accumulator,
const sVec3f newValue,
tF32  smoothRate 
) const
pure virtual

Blends new values into an accumulator to produce a smoothed time series.

Parameters
accumulatoris the current value of the accumulator
newValueis the new value to accumulate
smoothRatetypically made proportional to "frameTime". If smoothRate is 0 the accumulator will not change, if smoothRate is 1 the accumulator is set to the new value (no smoothing), useful values are "near zero".
Returns
the new smoothed value of the accumulator
virtual sVec3f Vec3Abs ( const sVec3f aV) const
pure virtual

Abs.

virtual sVec3f Vec3Min ( const sVec3f aLeft,
const sVec3f aRight 
) const
pure virtual

Min.

virtual sVec3f Vec3Max ( const sVec3f aLeft,
const sVec3f aRight 
) const
pure virtual

Max.

virtual sVec3f Vec3CatmullRom ( const sVec3f V1,
const sVec3f V2,
const sVec3f V3,
const sVec3f V4,
tF32  s 
) const
pure virtual

CatmullRom spline.

virtual sVec3f Vec3Hermite ( const sVec3f V1,
const sVec3f V2,
const sVec3f V3,
const sVec3f V4,
tF32  s 
) const
pure virtual

Hermite spline.

virtual sVec3f Vec3BaryCentric ( const sVec3f V1,
const sVec3f V2,
const sVec3f V3,
tF32  u,
tF32  v 
) const
pure virtual

BaryCentric.

virtual sVec4f Vec3Transform ( const sVec3f aVec,
const sMatrixf aMatrix 
) const
pure virtual

Transform by the specified matrix.

virtual sVec3f Vec3TransformCoord ( const sVec3f aVec,
const sMatrixf aMatrix 
) const
pure virtual

Transform by the specified matrix.

virtual sVec3f Vec3TransformNormal ( const sVec3f aVec,
const sMatrixf aMatrix 
) const
pure virtual

Transform by the specified matrix.

virtual void Vec3TransformCoordArray ( tVec3fCVec apVecs,
const sMatrixf aMatrix 
) const
pure virtual

Transform an array by the specified matrix.

virtual void Vec3TransformNormalArray ( tVec3fCVec apVecs,
const sMatrixf aMatrix 
) const
pure virtual

Transform an array by the specified matrix.

virtual sVec3f Vec3Unproject ( const sVec3f avIn,
const sRectf aVP,
const sMatrixf amtxViewProj 
) const
pure virtual

Unproject a vector.

virtual sVec3f Vec3Project ( const sVec3f avPos,
const sMatrixf amtxWVP,
const sRectf aRect 
) const
pure virtual

Project a vector.

virtual sVec4f Vec3ProjectRHW ( const sVec3f avPos,
const sMatrixf amtxWVP,
const sRectf aRect 
) const
pure virtual

Project a vector.

virtual sVec3f Vec3Reflect ( const sVec3f Dir,
const sVec3f Normal 
) const
pure virtual

Returns a vector reflected about the plane indicated by the specified normal.

Remarks
The formula is : R = (Dir - (Normal*Normal.dot(Dir)*2.0)
The input is assumed to have been normalized
virtual sVec4f Vec4Add ( const sVec4f aLeft,
const sVec4f aRight 
) const
pure virtual

Add.

virtual sVec4f Vec4Sub ( const sVec4f aLeft,
const sVec4f aRight 
) const
pure virtual

Subtract.

virtual sVec4f Vec4Mul ( const sVec4f aLeft,
const sVec4f aRight 
) const
pure virtual

Multiply.

virtual sVec4f Vec4Div ( const sVec4f aLeft,
const sVec4f aRight 
) const
pure virtual

Divide.

virtual sVec4f Vec4Scale ( const sVec4f aLeft,
tF32  afRight 
) const
pure virtual

Scale.

virtual tI32 Vec4Compare ( const sVec4f aLeft,
const sVec4f aRight 
) const
pure virtual

Compare.

virtual tF32 Vec4Length ( const sVec4f aV) const
pure virtual

Length.

virtual tF32 Vec4LengthSq ( const sVec4f aV) const
pure virtual

Length squared.

virtual sVec4f Vec4Normalize ( const sVec4f aV) const
pure virtual

Normalize.

virtual tBool Vec4IsNormal ( const sVec4f aV) const
pure virtual

Return eTrue if it's a normal vector.

virtual tF32 Vec4Dot ( const sVec4f aLeft,
const sVec4f aRight 
) const
pure virtual

Dot product.

virtual sVec4f Vec4Cross ( const sVec4f aA,
const sVec4f aB,
const sVec4f aC 
) const
pure virtual

Cross product.

virtual sVec4f Vec4Lerp ( const sVec4f aLeft,
const sVec4f aRight,
tF32  afF 
) const
pure virtual

Lerp.

virtual sVec4f Vec4Lerp2 ( const sVec4f aLeft,
const sVec4f aRight,
const sVec4f aF 
) const
pure virtual

Lerp.

virtual sVec4f Vec4BlendIntoAccumulator ( const sVec4f accumulator,
const sVec4f newValue,
tF32  smoothRate 
) const
pure virtual

Blends new values into an accumulator to produce a smoothed time series.

Parameters
accumulatoris the current value of the accumulator
newValueis the new value to accumulate
smoothRatetypically made proportional to "frameTime". If smoothRate is 0 the accumulator will not change, if smoothRate is 1 the accumulator is set to the new value (no smoothing), useful values are "near zero".
Returns
the new smoothed value of the accumulator
virtual sVec4f Vec4Abs ( const sVec4f aV) const
pure virtual

Abs.

virtual sVec4f Vec4Min ( const sVec4f aLeft,
const sVec4f aRight 
) const
pure virtual

Min.

virtual sVec4f Vec4Max ( const sVec4f aLeft,
const sVec4f aRight 
) const
pure virtual

Max.

virtual sVec4f Vec4CatmullRom ( const sVec4f V1,
const sVec4f V2,
const sVec4f V3,
const sVec4f V4,
tF32  s 
) const
pure virtual

CatmullRom spline.

virtual sVec4f Vec4Hermite ( const sVec4f V1,
const sVec4f V2,
const sVec4f V3,
const sVec4f V4,
tF32  s 
) const
pure virtual

Hermite spline.

virtual sVec4f Vec4BaryCentric ( const sVec4f V1,
const sVec4f V2,
const sVec4f V3,
tF32  u,
tF32  v 
) const
pure virtual

BaryCentric.

virtual sVec4f Vec4Transform ( const sVec4f aVec,
const sMatrixf aMatrix 
) const
pure virtual

Transform by the specified matrix.

virtual void Vec4TransformArray ( tVec4fCVec apVecs,
const sMatrixf aMatrix 
) const
pure virtual

Transform an array by the specified matrix.

virtual sMatrixf MatrixIdentity ( ) const
pure virtual

Get the identity matrix.

virtual tBool MatrixIsIdentity ( const sMatrixf M) const
pure virtual

Check if a matrix is identity.

virtual sMatrixf MatrixAdd ( const sMatrixf aLeft,
const sMatrixf aRight 
) const
pure virtual

Add.

virtual sMatrixf MatrixSub ( const sMatrixf aLeft,
const sMatrixf aRight 
) const
pure virtual

Subtract.

virtual sMatrixf MatrixScale ( const sMatrixf aLeft,
tF32  afRight 
) const
pure virtual

Scale.

virtual sMatrixf MatrixLerp ( const sMatrixf A,
const sMatrixf B,
tF32  fFac 
) const
pure virtual

Lerp.

virtual tI32 MatrixCompare ( const sMatrixf aLeft,
const sMatrixf aRight 
) const
pure virtual

Compare.

virtual sMatrixf MatrixMultiply ( const sMatrixf M1,
const sMatrixf M2 
) const
pure virtual

Multiply two matrix.

virtual tF32 MatrixDeterminant2 ( const sMatrixf M) const
pure virtual

Compute the top left 2x2 matrix determinant.

virtual tF32 MatrixDeterminant3 ( const sMatrixf M) const
pure virtual

Compute the top left 3x3 matrix determinant.

virtual tF32 MatrixDeterminant ( const sMatrixf M) const
pure virtual

Compute matrix determinant.

virtual tF32 MatrixGetHandeness ( const sMatrixf M) const
pure virtual

Compute matrix handeness.

Returns
a number > +1 if left handed and -1 if right handed
virtual sMatrixf MatrixInverse ( const sMatrixf M) const
pure virtual

Inverse the given matrix.

virtual sMatrixf MatrixTransformInverse ( const sMatrixf M) const
pure virtual

Inverse the transformation part. Means transpose the rotation and negate the translation.

virtual sMatrixf MatrixLookAtRH ( const sVec3f Eye,
const sVec3f At,
const sVec3f Up 
) const
pure virtual

Make a right handed look at matrix.

virtual sMatrixf MatrixLookAtLH ( const sVec3f Eye,
const sVec3f At,
const sVec3f Up 
) const
pure virtual

Make a left handed look at matrix.

virtual sMatrixf MatrixOrthoRH ( tF32  w,
tF32  h,
tF32  zn,
tF32  zf 
) const
pure virtual

Make a right handed orthogonal projection matrix.

virtual sMatrixf MatrixOrthoLH ( tF32  w,
tF32  h,
tF32  zn,
tF32  zf 
) const
pure virtual

Make a left handed orthogonal projection matrix.

virtual sMatrixf MatrixOrthoOffCenterRH ( tF32  l,
tF32  r,
tF32  t,
tF32  b,
tF32  zn,
tF32  zf 
) const
pure virtual

Make a right handed orthogonal projection matrix.

virtual sMatrixf MatrixOrthoOffCenterLH ( tF32  l,
tF32  r,
tF32  t,
tF32  b,
tF32  zn,
tF32  zf 
) const
pure virtual

Make a left handed orthogonal projection matrix.

virtual sMatrixf MatrixPerspectiveRH ( tF32  w,
tF32  h,
tF32  zn,
tF32  zf 
) const
pure virtual

Make a right handed perspective projection matrix.

virtual sMatrixf MatrixPerspectiveLH ( tF32  w,
tF32  h,
tF32  zn,
tF32  zf 
) const
pure virtual

Make a left handed perspective projection matrix.

virtual sMatrixf MatrixPerspectiveFovRH ( tF32  fovy,
tF32  aspect,
tF32  zn,
tF32  zf 
) const
pure virtual

Make a right handed perspective projection matrix.

virtual sMatrixf MatrixPerspectiveFovLH ( tF32  fovy,
tF32  aspect,
tF32  zn,
tF32  zf 
) const
pure virtual

Make a left handed perspective projection matrix.

virtual sMatrixf MatrixPerspectiveOffCenterRH ( tF32  l,
tF32  r,
tF32  t,
tF32  b,
tF32  zn,
tF32  zf 
) const
pure virtual

Make a right handed perspective projection matrix.

virtual sMatrixf MatrixPerspectiveOffCenterLH ( tF32  l,
tF32  r,
tF32  t,
tF32  b,
tF32  zn,
tF32  zf 
) const
pure virtual

Make a left handed perspective projection matrix.

virtual sMatrixf MatrixReflect ( const sPlanef Plane) const
pure virtual

Make a reflection matrix.

virtual sMatrixf MatrixRotationAxis ( const sVec3f V,
tF32  angle 
) const
pure virtual

Make a rotation matrix.

virtual sMatrixf MatrixRotationQuat ( const sQuatf Q) const
pure virtual

Make a rotation matrix.

virtual sMatrixf MatrixRotationX ( tF32  angle) const
pure virtual

Make a rotation matrix.

virtual sMatrixf MatrixRotationY ( tF32  angle) const
pure virtual

Make a rotation matrix.

virtual sMatrixf MatrixRotationZ ( tF32  angle) const
pure virtual

Make a rotation matrix.

virtual sMatrixf MatrixRotationYawPitchRoll ( tF32  yaw,
tF32  pitch,
tF32  roll 
) const
pure virtual

Make a rotation matrix.

virtual sVec3f MatrixDecomposeYawPitchRoll ( const sMatrixf M) const
pure virtual

Extract the rotation contained in the provided matrix as yaw/heading/Y, pitch/X and roll/bank/Z in radians.

See also
MatrixRotationYawPitchRoll
virtual sMatrixf MatrixScaling ( const sVec3f V) const
pure virtual

Make a scaling matrix.

virtual sMatrixf MatrixVecScale ( const sMatrixf M,
const sVec3f V 
) const
pure virtual

Scale a matrix.

virtual sMatrixf MatrixShadow ( const sVec4f vLight,
const sPlanef Plane 
) const
pure virtual

Make a shadow projection matrix.

virtual sMatrixf MatrixTranslation ( const sVec3f V) const
pure virtual

Make a translation matrix.

virtual sMatrixf MatrixTranspose ( const sMatrixf M) const
pure virtual

Transpose a matrix.

virtual sMatrixf MatrixTranspose3x3 ( const sMatrixf M) const
pure virtual

Transpose a matrix.

virtual sMatrixf MatrixTextureOffset ( tF32  fBias,
tI32  nTexW,
tI32  nTexH 
)
pure virtual

Texture offset matrix.

virtual sMatrixf MatrixTextureOffset2 ( tF32  fBias,
tI32  nTexW,
tI32  nTexH,
tI32  nDepthBits 
)
pure virtual

Texture offset matrix that takes in account a bit depth.

virtual sVec3f MatrixGetForward ( const sMatrixf M) const
pure virtual

Get the forward vector of a matrix.

virtual sVec3f MatrixGetUp ( const sMatrixf M) const
pure virtual

Get the up vector of a matrix.

virtual sVec3f MatrixGetRight ( const sMatrixf M) const
pure virtual

Get the right vector of a matrix.

virtual sVec3f MatrixGetTranslation ( const sMatrixf M) const
pure virtual

Get the translation vector of a matrix.

virtual sMatrixf MatrixSetForward ( const sMatrixf M,
const sVec3f V 
) const
pure virtual

Set the forward vector of a matrix.

virtual sMatrixf MatrixSetUp ( const sMatrixf M,
const sVec3f V 
) const
pure virtual

Set the up vector of a matrix.

virtual sMatrixf MatrixSetRight ( const sMatrixf M,
const sVec3f V 
) const
pure virtual

Set the right vector of a matrix.

virtual sMatrixf MatrixSetTranslation ( const sMatrixf M,
const sVec3f V 
) const
pure virtual

Set the translation vector of a matrix.

virtual tBool MatrixIsNormal ( const sMatrixf M) const
pure virtual

Check if a matrix is normalized.

virtual tBool MatrixIsOrthogonal ( const sMatrixf M) const
pure virtual

Check if a matrix is orthogonal.

virtual tBool MatrixIsOrthoNormal ( const sMatrixf M) const
pure virtual

Check if a matrix is orthonormal.

virtual sMatrixf MatrixSetRotation ( const sMatrixf In,
const sMatrixf RotM 
) const
pure virtual

Set the rotation part of a matrix.

virtual sVec3f MatrixToEuler ( const sMatrixf M) const
pure virtual

Get euler angles from a rotation matrix.

virtual sMatrixf MatrixToCoordinateSystem ( const sVec3f avRight,
const sVec3f avUp,
const sVec3f avFwd,
const sVec3f avOrg 
) const
pure virtual

Make a coordinate system conversion matrix.

virtual sVec3f MatrixGetProjectedTranslation ( const sMatrixf In) const
pure virtual

Get the translation by 'unprojecting' the translation from the matrix's axis (translation of inverse matrix).

Remarks
This can be used to get the world position from a view matrix.
virtual sMatrixf MatrixSetProjectedTranslation ( const sMatrixf In,
const sVec3f avT 
) const
pure virtual

Set the translation by projecting it onto the matrix's axis.

Remarks
This can be used to set a world position into a view matrix.
virtual sMatrixf MatrixSetNotRotation ( const sMatrixf In,
const sMatrixf M 
) const
pure virtual

Set the non-rotation part of the matrix.

virtual sMatrixf MatrixRotate ( const sMatrixf M1,
const sMatrixf M2 
) const
pure virtual

Rotate the matrix, this affects only the 3x3 top-left rotation part of the matrix.

virtual sMatrixf MatrixViewport ( const sVec4f aVP,
tF32  afMinZ,
tF32  afMaxZ 
)
pure virtual

Compute a viewport matrix.

Remarks
a Viewport matrix converts from project coordinates to viewport/window/screen coordinates.
This is used to scale the projection to fit into a viewport which is different of the current hardware viewport. FinalProj = MatrixProjection
  • inverse(MatrixContextVP)
  • MatrixVirtualVP
MinZ/MaxZ is usually 0/1
virtual sMatrixf MatrixAdjustViewport ( const sVec4f aContextVP,
const sVec4f aVirtualVP,
tF32  afMinZ,
tF32  afMaxZ 
)
pure virtual

Compute a matrix that will compensate the projection matrix to fit into a viewport which is different of the context/physical viewport.

Remarks
FinalProj = Proj * MatrixAdjustViewport(...)
MinZ/MaxZ is usually 0/1
virtual sVec3f MatrixDecomposeGetTranslation ( const sMatrixf aMatrix)
pure virtual

Get the translation part of a matrix.

virtual sVec3f MatrixDecomposeGetZYX ( const sMatrixf aMatrix)
pure virtual

Get the rotation part of a matrix as euler angle in the Z*Y*X rotation order.

virtual sQuatf MatrixDecomposeGetQ ( const sMatrixf aMatrix)
pure virtual

Get the rotation part of a matrix as a quaternion.

virtual sVec4f MatrixDecomposeGetScale ( const sMatrixf aMatrix)
pure virtual

Get the local scaling part of a matrix (x,y,z,handness)

virtual sMatrixf MatrixCompose ( const sVec3f aT,
const sVec3f aZYX,
const sVec4f aS 
)
pure virtual

Build a matrix from a translation, zyx euler rotation and scale.

virtual sMatrixf MatrixComposeQ ( const sVec3f aT,
const sQuatf aQ,
const sVec4f aS 
)
pure virtual

Build a matrix from a translation, rotation quaternion and scale.

virtual sQuatf QuatIdentity ( ) const
pure virtual

Get the identity quaternion.

virtual tBool QuatIsIdentity ( const sQuatf Q) const
pure virtual

Check if the quaternion is identity.

virtual sQuatf QuatAdd ( const sQuatf aLeft,
const sQuatf aRight 
) const
pure virtual

Add.

virtual sQuatf QuatSub ( const sQuatf aLeft,
const sQuatf aRight 
) const
pure virtual

Subtract.

virtual sQuatf QuatScale ( const sQuatf aLeft,
tF32  afRight 
) const
pure virtual

Scale.

virtual tI32 QuatCompare ( const sQuatf aLeft,
const sQuatf aRight 
) const
pure virtual

Compare.

virtual sQuatf QuatBaryCentric ( const sQuatf Q1,
const sQuatf Q2,
const sQuatf Q3,
tF32  f,
tF32  g 
) const
pure virtual

BaryCenter.

virtual sQuatf QuatConjugate ( const sQuatf Q) const
pure virtual

Quat conjugate.

virtual tF32 QuatDot ( const sQuatf Q1,
const sQuatf Q2 
) const
pure virtual

Quat dot.

virtual sQuatf QuatExp ( const sQuatf Q) const
pure virtual

Quat exponentials.

virtual sQuatf QuatInverse ( const sQuatf Q) const
pure virtual

Quat inverse.

virtual tF32 QuatLength ( const sQuatf Q) const
pure virtual

Quat length.

virtual tF32 QuatLengthSq ( const sQuatf Q) const
pure virtual

Quat length squared.

virtual sQuatf QuatLn ( const sQuatf Q) const
pure virtual

Calculates the natural logarithm.

virtual sQuatf QuatMultiply ( const sQuatf Q1,
const sQuatf Q2 
) const
pure virtual

Quat multiply.

virtual sQuatf QuatNormalize ( const sQuatf Q) const
pure virtual

Quat normalize.

virtual sQuatf QuatRotationAxis ( const sVec3f V,
tF32  angle 
) const
pure virtual

Rotation quaternion.

virtual sQuatf QuatRotationX ( tF32  angle) const
pure virtual

Rotation quaternion.

virtual sQuatf QuatRotationY ( tF32  angle) const
pure virtual

Rotation quaternion.

virtual sQuatf QuatRotationZ ( tF32  angle) const
pure virtual

Rotation quaternion.

virtual sQuatf QuatRotationXYZ ( const sVec3f V) const
pure virtual

Rotation quaternion.

virtual sQuatf QuatRotationMatrix ( const sMatrixf M) const
pure virtual

Rotation quaternion.

virtual sQuatf QuatRotationYawPitchRoll ( const tF32  yaw,
const tF32  pitch,
const tF32  roll 
) const
pure virtual

Rotation quaternion.

virtual sQuatf QuatRotationVector ( const sVec3f vFrom,
const sVec3f vTo 
) const
pure virtual

Rotation quaternion.

virtual sQuatf QuatSlerp ( const sQuatf Q1,
const sQuatf Q2,
tF32  t,
eQuatSlerp  mode 
) const
pure virtual

Quat slerp.

virtual sQuatf QuatSquad ( const sQuatf Q1,
const sQuatf Q2,
const sQuatf Q3,
const sQuatf Q4,
tF32  t 
) const
pure virtual

Quat squad.

virtual sVec4f QuatToAxisAngle ( const sQuatf Q) const
pure virtual

Quat to axis angle.

virtual sVec3f QuatToEuler ( const sQuatf Q) const
pure virtual

Quat to euler.

virtual tF32 PlaneDot ( const sPlanef P,
const sVec4f V 
) const
pure virtual

4D dot product between a plane and a 4d vector.

virtual tF32 PlaneDotCoord ( const sPlanef P,
const sVec3f V 
) const
pure virtual

4D dot product between a plane and a 3d vector (w is assumed 1).

virtual tF32 PlaneDotNormal ( const sPlanef P,
const sVec3f V 
) const
pure virtual

3D dot product between a plane and a 3d vector.

virtual tF32 PlaneDistance ( const sPlanef P,
const sVec3f V 
) const
pure virtual

Distance between a plane and the specified point.

virtual sPlanef PlaneFromPointNormal ( const sVec3f vPoint,
const sVec3f vNormal 
) const
pure virtual

Construct a plane from a point and a normal.

virtual sPlanef PlaneFromPoints ( const sVec3f V1,
const sVec3f V2,
const sVec3f V3 
) const
pure virtual

Construct a plane from three points.

virtual sVec4f PlaneIntersectLine ( const sPlanef P,
const sVec3f V1,
const sVec3f V2 
) const
pure virtual

Compute the intersection between a plane and a line.

Returns
the intersection point (x,y,z), t is stored in the w component
Remarks
returns a null vector if the line is parralel to the plane.
virtual sVec4f PlaneIntersectRay ( const sPlanef P,
const sVec3f avRayPos,
const sVec3f avRayDir 
) const
pure virtual

Compute the intersection between a plane and a ray.

Returns
the intersection point (x,y,z), t is stored in the w component
Remarks
returns a null vector if the line is parralel to the plane.
virtual sPlanef PlaneNormalize ( const sPlanef P) const
pure virtual

Normalize the specified plane.

virtual sPlanef PlaneTransform ( const sPlanef P,
const sMatrixf M 
) const
pure virtual

Transform the plane by the specified matrix.

virtual sPlanef PlaneTransformInversedMatrix ( const sPlanef P,
const sMatrixf M 
) const
pure virtual

Transform the plane by the inverse of the specified matrix.

virtual sVec3f PlaneIntersection ( const sPlanef PA,
const sPlanef PB,
const sPlanef PC 
) const
pure virtual

Get the intersection point between 3d planes.

virtual sVec3f PlaneClosest ( const sPlanef P,
const sVec3f A 
) const
pure virtual

Get the closest point on the plane to the specified vector.

virtual ePlaneType PlaneType ( const sPlanef Plane) const
pure virtual

Get the type of plane.

virtual ePlaneType PlaneMaxType ( const sPlanef Plane) const
pure virtual

Get the type of plane's maximum component.

virtual sMatrixf PlaneExtractCoordinateSystem ( const sPlanef Plane,
const sVec3f avFwdDir 
) const
pure virtual

Extract a coordinate system from the plane.

Parameters
Plane
avFwdDirif not zero is the direction toward which the forward vector should be the closest. For example if you want the forward vector to be the one that points down you'd pass sVec3f::OpYAxis() here.
Remarks
Up vector (Y) is the plane normal.
Right (X) and Fwd (Z) lies on the plane.
virtual tBool PlaneIntersectSphere ( const sPlanef plane,
const sVec3f avCenter,
const tF32  afRadius 
) const
pure virtual

Check if the specified sphere intersect the specified plane.

virtual sVec4f TriangleAreaNormal ( const sVec3f V0,
const sVec3f V1,
const sVec3f V2 
) const
pure virtual

Compute the normal and area of a triangle.

Returns
The normal is in xyz and the area in w.
virtual tBool TriangleIsDegenerate ( const sVec3f V0,
const sVec3f V1,
const sVec3f V2 
) const
pure virtual

Check whether the triangle is degenerated.

virtual tBool TriangleIntersectTriangle ( const sVec3f V0,
const sVec3f V1,
const sVec3f V2,
const sVec3f U0,
const sVec3f U1,
const sVec3f U2 
) const
pure virtual

Check triangle-triangle intersection.

virtual sVec3f TriangleIntersectRay ( const sVec3f avOrigin,
const sVec3f avDir,
const sVec3f V0,
const sVec3f V1,
const sVec3f V2 
) const
pure virtual

Check triangle-ray intersection.

virtual sVec3f TriangleIntersectRayCull ( const sVec3f avOrigin,
const sVec3f avDir,
const sVec3f V0,
const sVec3f V1,
const sVec3f V2 
) const
pure virtual

Check triangle-ray intersection with culling.

virtual tBool TriangleIntersectAABB ( const sVec3f V0,
const sVec3f V1,
const sVec3f V2,
const sVec3f avMin,
const sVec3f avMax 
) const
pure virtual

Check triangle-aabb intersection.

virtual sVec3f TriangleBaryCentric ( const sVec3f A,
const sVec3f B,
const sVec3f C,
const sVec3f P 
) const
pure virtual

Compute the barycentric coordinates of the specified point.

virtual tF32 WrapFloat ( tF32  aX,
tF32  aMin,
tF32  aMax 
) const
pure virtual

Wrap a floating value between the specified min and max values.

virtual tI32 WrapInt ( tI32  aX,
tI32  aMin,
tI32  aMax 
) const
pure virtual

Wrap an integer value between the specified min and max values.

virtual tF32 WrapRad ( tF32  aX) const
pure virtual

Wrap a radian between 0 and 2pi.

virtual tF32 WrapRad2 ( tF32  aX) const
pure virtual

Wrap a radian between -pi and pi.

virtual tF32 GetAngleFromPoints2D ( const sVec2f aStartPos,
const sVec2f aGoalPos 
) const
pure virtual

Get the angle between two 2d vectors, returns an angle in [0;2pi].

virtual sVec2f GetAngleFromPoints3D ( const sVec3f aStartPos,
const sVec3f aGoalPos 
) const
pure virtual

Get the angles between two 3d vectors.

Remarks
The angles returned are on the sphere that can be visualized with StartPos as center and Radius as Len(aGoalPos-aStartPos).
  • Y is the yaw/left-right/latitude angle in radians, its domain is [0;2pi]
  • X is the pitch/up-down/longitude angle in radians, its domain is [0;pi], 0 is the bottom of the sphere, and pi the top of the sphere.
virtual eClassify ClassifyPoint ( const sPlanef plane,
const sVec3f point 
) const
pure virtual

Check whether a point is in-front, behind or on a plane.

virtual tBool IsPointInsideEdge ( const sVec3f A,
const sVec3f B,
const sVec3f P 
) const
pure virtual

Check whether a point is on the specified edge.

virtual sVec3f ClosestPointOnLine ( const sVec3f A,
const sVec3f B,
const sVec3f P 
) const
pure virtual

Return the closest point to the specified vector P on the specified AB line.

virtual sVec3f ClosestPointOnTriangle ( const sVec3f A,
const sVec3f B,
const sVec3f C,
const sVec3f P 
) const
pure virtual

Return the closest point to the specified vector P on the specified ABC triangle.

virtual tF32 GetAngularDifference ( tF32  afA,
tF32  afB 
) const
pure virtual

Get the shortest 'distance' (angular difference) between two angles, no matter if the angles are in the [0;pi][-0;-pi] range or the [0;2pi] range.

virtual sVec3f GetScreenPosition ( const sVec3f avPos,
const sMatrixf mtxVP,
const sRectf aRect 
) const
pure virtual

Get the screen position of the specified 3d world position.

virtual sVec3f Vec3SphericalToCartesian ( const sVec3f avS) const
pure virtual

Convert a 3d spherical coordinate to a 3d cartesian coordinate.

virtual sVec3f Vec3CartesianToSpherical ( const sVec3f avC) const
pure virtual

Convert a 3d cartesian coordinate to a 3d spherical coordinate.

virtual sVec3f Vec3OrbitPitch ( const sVec3f aTarget,
const sVec3f aPos,
tF32  afPitch 
) const
pure virtual

Orbit/rotate a 3d position of the specified yaw (Y-axis) angle around the specified target.

virtual sVec3f Vec3OrbitYaw ( const sVec3f aTarget,
const sVec3f aPos,
tF32  afYaw 
) const
pure virtual

Orbit/rotate a 3d position of the specified pitch (X-axis) angle around the specified target.

virtual sVec3f Vec3OrbitYawPitch ( const sVec3f aTarget,
const sVec3f aPos,
tF32  afYaw,
tF32  afPitch 
) const
pure virtual

Orbit/rotate a 3d position of the specified yaw (Y-axis) and then pitch (X-axis) angle around the specified target.

virtual tF32 ComputePixelScaleX ( const sVec3f aPos,
const sMatrixf amtxWorldView,
const sMatrixf amtxProj,
const sRectf aVP 
) const
pure virtual

Compute a pixel to world unit scale value, based on the X-axis delta.

virtual tF32 ComputePixelScaleY ( const sVec3f aPos,
const sMatrixf amtxWorldView,
const sMatrixf amtxProj,
const sRectf aVP 
) const
pure virtual

Compute a pixel to world unit scale value, based on the Y-axis delta.

virtual tF32 ComputePixelWorldSizeX ( const tF32  afPixelSize,
const sVec3f avPos,
const sMatrixf mtxWorldView,
const sMatrixf mtxProj,
const sRectf aVP 
) const
pure virtual

Compute the world size of the given pixel size, scale based on the X-axis delta.

virtual tF32 ComputePixelWorldSizeY ( const tF32  afPixelSize,
const sVec3f avPos,
const sMatrixf mtxWorldView,
const sMatrixf mtxProj,
const sRectf aVP 
) const
pure virtual

Compute the world size of the given pixel size, scale based on the Y-axis delta.

virtual sVec2f ComputePixelWorldSizeVec2 ( const tF32  afPixelSize,
const sVec3f avPos,
const sMatrixf mtxWorldView,
const sMatrixf mtxProj,
const sRectf aVP 
) const
pure virtual

Compute the world size of the given pixel size, scale based on the X and Y axis delta.

virtual tF32 ComputePixelWorldSize ( const tF32  afPixelSize,
const sVec3f avPos,
const sMatrixf amtxWorldView,
const sMatrixf amtxProj,
const sRectf aVP 
) const
pure virtual

Compute the world size of the give pixel size, scale based on the axis with the highest resolution.

virtual tF32 Det2x2f ( const tF32  a,
const tF32  b,
const tF32  c,
const tF32  d 
) const
pure virtual

Computes a 2x2 matrix determinant.

virtual tF32 Det3x3f ( const tF32  a0,
const tF32  a1,
const tF32  a2,
const tF32  a3,
const tF32  a4,
const tF32  a5,
const tF32  a6,
const tF32  a7,
const tF32  a8 
) const
pure virtual

Computes a 3x3 matrix determinant.

virtual tF32 Det4x4f ( const tF32  a0,
const tF32  a1,
const tF32  a2,
const tF32  a3,
const tF32  a4,
const tF32  a5,
const tF32  a6,
const tF32  a7,
const tF32  a8,
const tF32  a9,
const tF32  a10,
const tF32  a11,
const tF32  a12,
const tF32  a13,
const tF32  a14,
const tF32  a15 
) const
pure virtual

Computes a 4x4 matrix determinant.

virtual tF64 Det2x2d ( const tF64  a,
const tF64  b,
const tF64  c,
const tF64  d 
) const
pure virtual

Computes a 2x2 matrix determinant.

virtual tF64 Det3x3d ( const tF64  a0,
const tF64  a1,
const tF64  a2,
const tF64  a3,
const tF64  a4,
const tF64  a5,
const tF64  a6,
const tF64  a7,
const tF64  a8 
) const
pure virtual

Computes a 3x3 matrix determinant.

virtual tF64 Det4x4d ( const tF64  a0,
const tF64  a1,
const tF64  a2,
const tF64  a3,
const tF64  a4,
const tF64  a5,
const tF64  a6,
const tF64  a7,
const tF64  a8,
const tF64  a9,
const tF64  a10,
const tF64  a11,
const tF64  a12,
const tF64  a13,
const tF64  a14,
const tF64  a15 
) const
pure virtual

Computes a 4x4 matrix determinant.

virtual tF32 FovHzToVt ( tF32  afHFov,
tF32  afWbyHAspect 
) const
pure virtual

Convert an horizontal fov to a vertical fov.

virtual tF32 FovVtToHz ( tF32  afVFov,
tF32  afWbyHAspect 
) const
pure virtual

Convert a vertical fov to an horizontal fov.

virtual tF64 ClampT ( tF64  aX,
tF64  aMin,
tF64  aMax 
) const
pure virtual
virtual tF64 RepeatT ( tF64  aX,
tF64  aMin,
tF64  aMax 
) const
pure virtual
virtual tF64 MirrorT ( tF64  aX,
tF64  aMin,
tF64  aMax 
) const
pure virtual
virtual tF64 CycleT ( tF64  aX,
tF64  aMin,
tF64  aMax 
) const
pure virtual
virtual tF64 CurveStep ( tF64  a,
tF64  b,
tF64  t 
) const
pure virtual
virtual tF64 CurveLinear ( tF64  V1,
tF64  V2,
tF64  s 
) const
pure virtual
virtual tF64 CurveCos ( tF64  a,
tF64  b,
tF64  t 
) const
pure virtual
virtual tF64 CurveHermite ( tF64  V1,
tF64  T1,
tF64  V2,
tF64  T2,
tF64  s 
) const
pure virtual
virtual tF64 CurveCatmullRom ( tF64  V1,
tF64  V2,
tF64  V3,
tF64  V4,
tF64  s 
) const
pure virtual
virtual tF64 CurveCardinal ( tF64  V1,
tF64  V2,
tF64  s,
tF64  a 
) const
pure virtual
virtual tF64 CurveCardinal4 ( tF64  V1,
tF64  V2,
tF64  V3,
tF64  V4,
tF64  s,
tF64  a 
) const
pure virtual
virtual tF64 CycleLinear ( tF64  aX,
tF64  aMin,
tF64  aMax 
) const
pure virtual
virtual tF64 CycleCos ( tF64  aX,
tF64  aMin,
tF64  aMax 
) const
pure virtual
virtual tF64 CycleCardinal ( tF64  aX,
tF64  aMin,
tF64  aMax,
tF64  a 
) const
pure virtual
virtual tF64 ProbSum ( tF64CVec apProbs)
pure virtual
virtual tBool ProbNormalize ( tF64CVec apProbs)
pure virtual
virtual tBool ProbSampleBuildAliasMethodArrays ( const tF64CVec apProbs,
tF64CVec apAMQ,
tU32CVec apAMA 
)
pure virtual
virtual tBool ProbSampleAliasMethod ( tU32CVec apResults,
const tF64CVec apAMQ,
const tU32CVec apAMA 
)
pure virtual