Types:
geXForm3d
A struct composed of 9 floats and a geVec3d. This structure represents a 4x4 transformation matrix.
geFloat AX geFloat AY geFloat AZ (geVec3d Translation).X geFloat BX geFloat BY geFloat BZ (geVec3d Translation).Y geFloat CX geFloat CY geFloat CZ (geVec3d Translation).Z 0.0f 0.0f 0.0f 1.0f This represents a right-handed transform.
Notes:
from GEXFORM3D.H: The Euler angles are subsequent rotations by Angles->Z around the Z axis, then by Angles->Y around the Y axis, in the newly rotate coordinates then by Angles->X around the X axis. "Left,Up,In" are just the basis vectors in the new coordinate space. You can get them by multiplying the unit bases into the transforms.
Macros:
#define GEXFORM3D_MINIMUM_SCALE (0.00001f)
This apparently represents the minimum logical scale value.Functions:
GENESISAPI void GENESISCC geXForm3d_Copy(const geXForm3d *Src, geXForm3d *Dst);
This function copies Src to Dst.Returns: nothing.
Notes:
from GEXFORM3D.H: copies Src to Dst.
GENESISAPI void GENESISCC geXForm3d_GetEulerAngles(const
geXForm3d *M, geVec3d *Angles);
This function computes the Euler Angles of M returning the result in Angles. The Euler Angles of a XForm is defined as the Angles that when applied in Z, then Y, then X order would produce the same rotational transform as the XForm.Returns: nothing.
Notes:
from GEXFORM3D.H: Finds Euler angles from M and puts them into Angles
GENESISAPI void GENESISCC geXForm3d_GetIn(const
geXForm3d *M, geVec3d *In);
This function returns the vector which is composed of (-AZ, -BZ, -CZ) from the matrix M.Returns: nothing.
Notes:
from GEXFORM3D.H: Gets a vector that is 'in' in the frame of reference of M (facing -Z)
GENESISAPI void GENESISCC geXForm3d_GetLeft(const
geXForm3d *M, geVec3d *Left);
This function returns the vector which is composed of (-AX, -BX, -CX) from the matrix M.Returns: nothing.
Notes:
from GEXFORM3D.H: Gets a vector that is 'left' in the frame of reference of M (facing -Z) (sic! that should be facing -X, I think)
GENESISAPI void GENESISCC geXForm3d_GetTranspose(const
geXForm3d *M, geXForm3d *MTranspose);
This function calculates the Transpose of M returning the result in MTranspose.Returns: nothing.
Notes:
from XFORM3D.H: Gets the Transpose transform of M (M^T). Transpose of a matrix is the switch of the rows and columns. The transpose is useful because it is rapidly computed and is equal to the inverse transform for orthonormal transforms. [inverse is (M') where M*M' = Identity ]
GENESISAPI void GENESISCC geXForm3d_GetUp(const
geXForm3d *M, geVec3d *Up);
This function returns the vector which is composed of (AY, BY, CY) from the matrix M.Returns: nothing.
Notes:
from XFORM3D.H: Gets a vector that is 'up' in the frame of reference of M (facing -Z) (sic! that should be facing +Y, I think)
GENESISAPI geBoolean GENESISCC geXForm3d_IsOrthogonal(const
geXForm3d *M);
This function tests whether the Matrix M is orthogonal. I believe this is used to test whether M represents a valid rotational or translational transform.Returns: GE_TRUE of M is orthogonal, GE_FALSE otherwise.
Notes:
from XFORM3D.H: returns GE_TRUE if M is orthogonal (row1 cross row2 = row3 & col1 cross col2 = col3). * does not check for right-handed convention *
GENESISAPI geBoolean GENESISCC geXForm3d_IsOrthonormal(const
geXForm3d *M);
This function tests whether the Matrix M is orthonormal. As noted below this tells us whether the transform would impart and scaling or shearing.Returns: GE_TRUE of M is orthonormal, GE_FALSE otherwise.
Notes:
from XFORM3D.H: returns GE_TRUE if M is orthonormal (if the rows and columns are all normalized (transform has no scaling or shearing) and is orthogonal (row1 cross row2 = row3 & col1 cross col2 = col3) * does not check for right-handed convention *
GENESISAPI geBoolean GENESISCC geXForm3d_IsValid(const
geXForm3d *M);
This function tests that M is non-NULL and all of its components are real values.Returns: GE_TRUE if M is valid, GE_FALSE otherwise.
Notes:
from XFORM3D.H: returns GE_TRUE if M is 'valid'. 'valid' means that M is non NULL, and there are no NAN's in the matrix.
GENESISAPI void GENESISCC geXForm3d_Mirror(const
geXForm3d *Source, const geVec3d *PlaneNormal, float PlaneDist,
geXForm3d *Dest);
This function takes a transform matrix Source and "mirrors" is about the plane with the normal PlaneNormal that is PlaneDist from the origin. The result is returned in Dest.Returns: nothing.
Notes:
from XFORM3D.H: Mirrors a XForm3d about a plane.
GENESISAPI void GENESISCC geXForm3d_Multiply(const
geXForm3d *M1, const geXForm3d *M2, geXForm3d *MProduct);
This function multiplies the two matrices M1 and M2 returning the result in MProduct. This can be used to apply the transform of M2 onto the M1 transformation.Returns: nothing.
Notes:
from XFORM3D.H: MProduct = matrix multiply of M1*M2. Concatenates the transformation in the M2 matrix onto the transformation in M1.
GENESISAPI void GENESISCC geXForm3d_Orthonormalize(geXForm3d
*M);
This function orthonormalizes the matrix M and returns the result in M replacing the original value. Orthonormalizing and orthogonal matrix removes and scaling or other distortions from the transformation.Returns: nothing.
Notes:
from XFORM3D.H: Essentially removes scaling (or other distortions) from an orthogonal (or nearly orthogonal) matrix. Returns a right-handed matrix.
GENESISAPI void GENESISCC geXForm3d_Rotate(const
geXForm3d *M, const geVec3d *V, geVec3d *Result);
This function takes the vector V and rotates it by the transform M returning the result in Result. No translation is performed.Returns: nothing.
Notes:
from XFORM3D.H: Result is Matrix M * Vector V: V Rotated by M (no translation).
GENESISAPI void GENESISCC geXForm3d_RotateX(geXForm3d
*M, geFloat RadianAngle);
This function rotates the transform M by RadianAngle radians about the X axis and returns the result in M replacing the original value.Returns: nothing.
Notes:
from XFORM3D.H: Rotates M by RadianAngle about X axis and applies the rotation to the existing contents of M.
GENESISAPI void GENESISCC geXForm3d_RotateY(geXForm3d
*M,geFloat RadianAngle);
This function rotates the transform M by RadianAngle radians about the Y axis and returns the result in M replacing the original value.Returns: nothing.
Notes:
from XFORM3D.H: Rotates M by RadianAngle about Y axis and applies the rotation to the existing contents of M.
GENESISAPI void GENESISCC geXForm3d_RotateZ(geXForm3d
*M,geFloat RadianAngle);
This function rotates the transform M by RadianAngle radians about the Z axis and returns the result in M replacing the original value.Returns: nothing.
Notes:
from XFORM3D.H: Rotates M by RadianAngle about Z axis and applies the rotation to the existing contents of M.
GENESISAPI void GENESISCC geXForm3d_Scale(geXForm3d
*M,geFloat x, geFloat y, geFloat z);
This function scales the transform M by the vector defined by (x,y,z) returning the result in M replacing the original contents.Returns: nothing.
Notes:
from XFORM3D.H: Scales M by x,y,z. Applies the scale to the existing contents of M.
GENESISAPI void GENESISCC geXForm3d_SetEulerAngles(geXForm3d
*M, const geVec3d *Angles);
This function can be used to set the rotational part of the transform M by the Euler angles in Angles. Any existing transformation in M is lost.Returns: nothing.
Notes:
from XFORM3D.H: Applies Euler angles to build M.
GENESISAPI void GENESISCC geXForm3d_SetFromLeftUpIn(geXForm3d
*M, const geVec3d *Left, const geVec3d *Up, const geVec3d *In);
incomplete
This function creates a transform utilizing the orthonormal vectors in Left, Up, and In and returns the result in M replacing the existing transformation.Returns: nothing.
Notes:
from XFORM3D.H: Builds an geXForm3d from orthonormal Left, Up and In vectors.Questions:
Does this only provide a rotation? If Left, Up and In are orthonormal doesn't that mean they only specify and rotation but not a translation?
GENESISAPI void GENESISCC geXForm3d_SetIdentity(geXForm3d
*M);
This function returns the Identity matrix in M, replacing its original contents.Returns: nothing.
Notes:
from XFORM3D.H: Sets M to an identity matrix (clears it).
GENESISAPI void GENESISCC geXForm3d_SetScaling(geXForm3d
*M,geFloat x, geFloat y, geFloat z);
This function creates a transform matrix M that produces the scaling (x,y,z). The contents of M are replaced.Returns: nothing.
Notes:
from XFORM3D.H: Sets up a transform that scales by x,y,z. All existing contents of M are replaced.
GENESISAPI void GENESISCC geXForm3d_SetTranslation(geXForm3d
*M,geFloat x, geFloat y, geFloat z);
This function creates a transform matrix M that produces the translation (x,y,z). The contents of M are replaced.Returns: nothing.
Notes:
from XFORM3D.H: Sets up a transform that translates x,y,z. All existing contents of M are replaced.
GENESISAPI void GENESISCC geXForm3d_SetXRotation(geXForm3d
*M,geFloat RadianAngle);
This function creates a transform matrix M that produces a rotation of RadianAngle radians about the X axis. The contents of M are replaced.Returns: nothing.
Notes:
from XFORM3D.H: Sets up a transform that rotates RadianAngle about X axis. All existing contents of M are replaced.
GENESISAPI void GENESISCC geXForm3d_SetYRotation(geXForm3d
*M,geFloat RadianAngle);
This function creates a transform matrix M that produces a rotation of RadianAngle radians about the Y axis. The contents of M are replaced.Returns: nothing.
Notes:
from XFORM3D.H: Sets up a transform that rotates RadianAngle about Y axis. All existing contents of M are replaced.
GENESISAPI void GENESISCC geXForm3d_SetZRotation(geXForm3d
*M,geFloat RadianAngle);
This function creates a transform matrix M that produces a rotation of RadianAngle radians about the Z axis. The contents of M are replaced.Returns: nothing.
Notes:
from XFORM3D.H: Sets up a transform that rotates RadianAngle about Z axis. All existing contents of M are replaced.
GENESISAPI void GENESISCC geXForm3d_Transform(const
geXForm3d *M, const geVec3d *V, geVec3d *Result);
This function transforms a vector V by the transform M returning the result in Result.Returns: nothing.
Notes:
from XFORM3D.H: Result is Matrix M * Vector V: V Tranformed by M.
GENESISAPI void GENESISCC geXForm3d_TransformArray(
const geXForm3d *XForm, const geVec3d *Source, geVec3d *Dest, int32 Count);
This function transforms the array of Count vectors in Source by the transform M returning the result in the array Dest.Returns: nothing.
GENESISAPI void GENESISCC geXForm3d_Translate(geXForm3d
*M,geFloat x, geFloat y, geFloat z);
This function translates the transform M by (x,y,z) returning the result in M.Returns: nothing.
Notes:
from XFORM3D.H: Translates M by x,y,z. Applies the translation to the existing contents of M.
GENESISAPI void GENESISCC geXForm3d_TransposeTransform(const
geXForm3d *M, const geVec3d *V, geVec3d *Result);
This function transforms a vector V by the transpose of the transform M returning the result in Result.Returns: nothing.
Notes:
from XFORM3D.H: Applies the transpose transform of M to V. Result = (M^T) * V.