fbsdk/fbmath.h File Reference

fbmath.h File Reference
+ Related help topics:
#include <kaydaradef.h>
#include <fbsdk/fbtypes.h>

File Description

Contains routines for vector and matrix manipulation.

Definition in file fbmath.h.

Namespaces

 ORSDK2018
 

Macros

#define FBSDK_DLL   K_DLLIMPORT
 Be sure that FBSDK_DLL is defined only once... More...
 

Enumerations

enum  FBRotationOrder {
  kFBXYZ, kFBXZY, kFBYXZ, kFBYZX,
  kFBZXY, kFBZYX
}
 Specify the Euler rotation order. More...
 

Functions

 FB_DEFINE_ENUM (, RotationOrder)
 
void FBMatrixInverse (FBMatrix &pMatrix, const FBMatrix &pSrc)
 Invert a matrix. More...
 
void FBMatrixTranspose (FBMatrix &pMatrix, const FBMatrix &pSrc)
 Transpose a matrix. More...
 
void FBMatrixMult (FBMatrix &pMatrix, const FBMatrix &pA, const FBMatrix &pB)
 Multiply two matrices. More...
 
void FBVertexMatrixMult (FBVertex &pOutVertex, const FBMatrix &pMatrix, const FBVertex &pVertex)
 Multiply a vertex by a matrix. More...
 
void FBVectorMatrixMult (FBVector4d &pOutVector, const FBMatrix &pMatrix, const FBVector4d &pVector)
 Multiply a vector by a matrix. More...
 
void FBTranslationToMatrix (FBMatrix &pMatrix, const FBTVector &pVector)
 Convert a translation vector to a matrix. More...
 
void FBRotationToMatrix (FBMatrix &pMatrix, const FBRVector &pVector, FBRotationOrder pRotationOrder=kFBXYZ)
 Convert a rotation vector to a matrix. More...
 
void FBScalingToMatrix (FBMatrix &pMatrix, const FBSVector &pVector)
 Convert a scaling vector to a matrix. More...
 
void FBTRSToMatrix (FBMatrix &pMatrix, const FBTVector &pTVector, const FBRVector &pRVector, const FBSVector &pSVector)
 Convert translation, rotation, and scaling vectors to a matrix. More...
 
void FBTQSToMatrix (FBMatrix &pMatrix, const FBTVector &pTVector, const FBQuaternion &pQuaternion, const FBSVector &pSVector)
 Convert translation vector, rotation quaternion, and scaling vector to a matrix. More...
 
void FBMatrixToTranslation (FBTVector &pVector, const FBMatrix &pMatrix)
 Obtain translation vector from a matrix. More...
 
void FBMatrixToRotation (FBRVector &pVector, const FBMatrix &pMatrix, FBRotationOrder pRotationOrder=kFBXYZ)
 Obtain rotation vector from a matrix. More...
 
void FBMatrixToScaling (FBSVector &pVector, const FBMatrix &pMatrix)
 Obtain scaling vector from a matrix. More...
 
void FBMatrixToTRS (FBTVector &pTVector, FBRVector &pRVector, FBSVector &pSVector, const FBMatrix &pMatrix)
 Obtain translation, rotation, and scaling vectors from a matrix. More...
 
void FBMatrixToTQS (FBTVector &pTVector, FBQuaternion &pQuaternion, FBSVector &pSVector, const FBMatrix &pMatrix)
 Obtain translation vector, rotation quaternion, and scaling vector from a matrix. More...
 
void FBRotationToQuaternion (FBQuaternion &pQuaternion, const FBRVector &pVector, FBRotationOrder pRotationOrder=kFBXYZ)
 Get a quaternion from a rotation vector. More...
 
void FBQuaternionToRotation (FBRVector &pVector, const FBQuaternion &pQuaternion, FBRotationOrder pRotationOrder=kFBXYZ)
 Get a rotation vector from a quaternion vector. More...
 
void FBMatrixToQuaternion (FBQuaternion &pQuaternion, const FBMatrix &pMatrix)
 Get a quaternion from a matrix (potential ). More...
 
void FBQuaternionToMatrix (FBMatrix &pMatrix, const FBQuaternion &pQuaternion)
 Get a rotation matrix from a quaternion vector. More...
 
void FBGetLocalMatrix (FBMatrix &pMatrix, const FBMatrix &pMatrixParent, const FBMatrix &pMatrixChild)
 Get local matrix from parent and child matrices. More...
 
void FBGetGlobalMatrix (FBMatrix &pMatrix, const FBMatrix &pMatrixParent, const FBMatrix &pLocalMatrix)
 Get global matrix from parent and child matrices. More...
 
void FBMatrixOrthogonalize (FBMatrix &pMatrix)
 Make sure that rotation vectors are orthogonal and normalized (fast way for removing scaling from matrix) More...
 
void FBAdd (FBTVector &pResult, const FBTVector &pV1, const FBTVector &pV2)
 Add two vectors together (pResult = pV1 + pV2) More...
 
void FBSub (FBTVector &pResult, const FBTVector &pV1, const FBTVector &pV2)
 Subtract pV2 from pV1 (pResult = pV1 - pV2) More...
 
void FBMult (FBTVector &pResult, const FBTVector &pV1, double pV2)
 Multiply pV2 from pV1 (pResult = pV1 * pV2) More...
 
void FBMult (FBTVector &pResult, const FBTVector &pV1, const FBTVector &pV2)
 Calculate the cross product of two vectors. More...
 
void FBMult (FBMatrix &pResult, const FBMatrix &pM, const FBSVector &pV)
 Calculate the cross product of a Matrix and Scale Vector. More...
 
double FBDot (const FBTVector &pV1, const FBTVector &pV2)
 Calculate the dot product of two vectors. More...
 
double FBLength (const FBTVector &pV)
 Get the length of a vector. More...
 
void FBQAdd (FBQuaternion &pResult, const FBQuaternion &pQ1, const FBQuaternion &pQ2)
 Add two quaternions together (pResult = pQ1 + pQ2) More...
 
void FBQSub (FBQuaternion &pResult, const FBQuaternion &pQ1, const FBQuaternion &pQ2)
 Subtract pQ2 from pQ1 (pResult = pQ1 - pQ2) More...
 
void FBQMult (FBQuaternion &pResult, const FBQuaternion &pQ1, double pQ2)
 Multiply pQ2 from pQ1 (pResult = pQ1 * pQ2) More...
 
void FBQMult (FBQuaternion &pResult, const FBQuaternion &pQ1, const FBQuaternion &pQ2)
 Calculate the cross product of two quaternions. More...
 
double FBQDot (const FBQuaternion &pQ1, const FBQuaternion &pQ2)
 Calculate the dot product of two quaternions. More...
 
double FBQLength (const FBQuaternion &pQ)
 Get the length of a quaternion. More...
 
double FBLength (const FBVertex &pV)
 Get the length of a vertex (from origin) More...
 
void FBInterpolateRotation (FBRVector &pROut, const FBRVector &pR0, const FBRVector &pR1, double pU)
 Interpolate a rotation in Euler space. More...
 
void FBInterpolateRotation (FBQuaternion &pQOut, const FBQuaternion &pQ0, const FBQuaternion &pQ1, double pU)
 Interpolate a rotation in Quaternion. More...
 
void FBGetContinuousRotation (FBRVector &pROut, const FBRVector &pR0, const FBRVector &pR1)
 Get a continuous rotation in Euler space. More...
 
double FBClamp (double pV, double pL, double pH)
 Clamp value. More...
 
void FBBigEndianToNative (unsigned short &pV)
 Change from big endian to native format. More...
 
void FBLittleEndianToNative (unsigned short &pV)
 Change from little endian to native format. More...
 
void FBMatrixToRotationWithPrecision (FBRVector &pVector, const FBMatrix &pMatrix, FBRotationOrder pRotationOrder, double pPrecision=FBMat2EulerDegenerateForPrecision10)
 Obtain rotation vector from a matrix. More...
 
void FBQuaternionToRotationWithPrecision (FBRVector &pVector, const FBQuaternion &pQuaternion, FBRotationOrder pRotationOrder, double pPrecision=FBMat2EulerDegenerateForPrecision10)
 Get a rotation vector from a quaternion vector. More...
 

Variables

const double FBMat2EulerDegenerateForPrecision10 = 16.0e-10
 

Macro Definition Documentation

#define FBSDK_DLL   K_DLLIMPORT

Be sure that FBSDK_DLL is defined only once...

Definition at line 48 of file fbmath.h.

Go to the source code of this file.