v2.0.2
Classes | Macros | Functions
CC3Matrix4x4.h File Reference
#import "CC3Matrix4x3.h"

Classes

union  CC3Matrix4x4
 

Macros

#define kCC3Matrix4x4ColumnCount   4
 
#define kCC3Matrix4x4ElementCount   16
 
#define kCC3Matrix4x4RowCount   4
 

Functions

static GLfloat CC3Det3x3 (GLfloat a1, GLfloat a2, GLfloat a3, GLfloat b1, GLfloat b2, GLfloat b3, GLfloat c1, GLfloat c2, GLfloat c3)
 
void CC3Matrix3x3CopyInto4x4 (const CC3Matrix3x3 *mtxSrc, CC3Matrix4x4 *mtx)
 
void CC3Matrix3x3PopulateFrom4x4 (CC3Matrix3x3 *mtx, const CC3Matrix4x4 *mtxSrc)
 
void CC3Matrix4x3CopyInto4x4 (const CC3Matrix4x3 *mtxSrc, CC3Matrix4x4 *mtx)
 
void CC3Matrix4x3PopulateFrom4x4 (CC3Matrix4x3 *mtx, const CC3Matrix4x4 *mtxSrc)
 
static CC3Vector CC3Matrix4x4ExtractForwardDirection (const CC3Matrix4x4 *mtx)
 
static CC3Quaternion CC3Matrix4x4ExtractQuaternion (const CC3Matrix4x4 *mtx)
 
static CC3Vector CC3Matrix4x4ExtractRightDirection (const CC3Matrix4x4 *mtx)
 
static CC3Vector CC3Matrix4x4ExtractRotationYXZ (const CC3Matrix4x4 *mtx)
 
static CC3Vector CC3Matrix4x4ExtractRotationZYX (const CC3Matrix4x4 *mtx)
 
static CC3Vector CC3Matrix4x4ExtractTranslation (const CC3Matrix4x4 *mtx)
 
static CC3Vector CC3Matrix4x4ExtractUpDirection (const CC3Matrix4x4 *mtx)
 
BOOL CC3Matrix4x4InvertAdjoint (CC3Matrix4x4 *m)
 
void CC3Matrix4x4InvertRigid (CC3Matrix4x4 *mtx)
 
static BOOL CC3Matrix4x4IsIdentity (const CC3Matrix4x4 *mtx)
 
void CC3Matrix4x4Multiply (CC3Matrix4x4 *mOut, const CC3Matrix4x4 *mL, const CC3Matrix4x4 *mR)
 
static void CC3Matrix4x4Orthonormalize (CC3Matrix4x4 *mtx, NSUInteger startColNum)
 
void CC3Matrix4x4PopulateFrom3x3 (CC3Matrix4x4 *mtx, const CC3Matrix3x3 *mtxSrc)
 
void CC3Matrix4x4PopulateFrom4x3 (CC3Matrix4x4 *mtx, const CC3Matrix4x3 *mtxSrc)
 
static void CC3Matrix4x4PopulateFrom4x4 (CC3Matrix4x4 *mtx, const CC3Matrix4x4 *mtxSrc)
 
static void CC3Matrix4x4PopulateFromGLKMatrix4 (CC3Matrix4x4 *mtx, const GLKMatrix4 *mtxSrc)
 
static void CC3Matrix4x4PopulateFromQuaternion (CC3Matrix4x4 *mtx, CC3Quaternion aQuaternion)
 
static void CC3Matrix4x4PopulateFromRotationX (CC3Matrix4x4 *mtx, const GLfloat degrees)
 
static void CC3Matrix4x4PopulateFromRotationY (CC3Matrix4x4 *mtx, const GLfloat degrees)
 
static void CC3Matrix4x4PopulateFromRotationYXZ (CC3Matrix4x4 *mtx, CC3Vector aRotation)
 
static void CC3Matrix4x4PopulateFromRotationZ (CC3Matrix4x4 *mtx, const GLfloat degrees)
 
static void CC3Matrix4x4PopulateFromRotationZYX (CC3Matrix4x4 *mtx, CC3Vector aRotation)
 
static void CC3Matrix4x4PopulateFromScale (CC3Matrix4x4 *mtx, const CC3Vector aScale)
 
static void CC3Matrix4x4PopulateFromTranslation (CC3Matrix4x4 *mtx, const CC3Vector aTranslation)
 
static void CC3Matrix4x4PopulateIdentity (CC3Matrix4x4 *mtx)
 
void CC3Matrix4x4PopulateInfiniteOrthoFrustum (CC3Matrix4x4 *mtx, const GLfloat left, const GLfloat right, const GLfloat top, const GLfloat bottom, const GLfloat near)
 
void CC3Matrix4x4PopulateInfinitePerspectiveFrustum (CC3Matrix4x4 *mtx, const GLfloat left, const GLfloat right, const GLfloat top, const GLfloat bottom, const GLfloat near)
 
void CC3Matrix4x4PopulateOrthoFrustum (CC3Matrix4x4 *mtx, const GLfloat left, const GLfloat right, const GLfloat top, const GLfloat bottom, const GLfloat near, const GLfloat far)
 
void CC3Matrix4x4PopulatePerspectiveFrustum (CC3Matrix4x4 *mtx, const GLfloat left, const GLfloat right, const GLfloat top, const GLfloat bottom, const GLfloat near, const GLfloat far)
 
static void CC3Matrix4x4PopulateToPointTowards (CC3Matrix4x4 *mtx, const CC3Vector fwdDirection, const CC3Vector upDirection)
 
static void CC3Matrix4x4PopulateZero (CC3Matrix4x4 *mtx)
 
static void CC3Matrix4x4RotateByQuaternion (CC3Matrix4x4 *mtx, CC3Quaternion aQuaternion)
 
static void CC3Matrix4x4RotateYXZBy (CC3Matrix4x4 *mtx, CC3Vector aRotation)
 
static void CC3Matrix4x4RotateZYXBy (CC3Matrix4x4 *mtx, CC3Vector aRotation)
 
static void CC3Matrix4x4ScaleBy (CC3Matrix4x4 *mtx, CC3Vector aScale)
 
CC3Vector4 CC3Matrix4x4TransformCC3Vector4 (const CC3Matrix4x4 *mtx, CC3Vector4 v)
 
CC3Vector CC3Matrix4x4TransformDirection (const CC3Matrix4x4 *mtx, CC3Vector v)
 
CC3Vector CC3Matrix4x4TransformLocation (const CC3Matrix4x4 *mtx, CC3Vector v)
 
static void CC3Matrix4x4TranslateBy (CC3Matrix4x4 *mtx, CC3Vector aTranslation)
 
void CC3Matrix4x4Transpose (CC3Matrix4x4 *mtx)
 
static CC3Vector4 CC3Vector4FromCC3Matrix4x4Col (const CC3Matrix4x4 *mtx, NSUInteger colIdx)
 
static CC3Vector4 CC3Vector4FromCC3Matrix4x4Row (const CC3Matrix4x4 *mtx, NSUInteger rowIdx)
 
static CC3Vector CC3VectorFromCC3Matrix4x4Col (const CC3Matrix4x4 *mtx, NSUInteger colIdx)
 
static CC3Vector CC3VectorFromCC3Matrix4x4Row (const CC3Matrix4x4 *mtx, NSUInteger rowIdx)
 
static void GLKMatrix4PopulateFromCC3Matrix4x4 (GLKMatrix4 *mtx, const CC3Matrix4x4 *mtxSrc)
 
NSString * NSStringFromCC3Matrix4x4 (const CC3Matrix4x4 *mtxPtr)
 

Macro Definition Documentation

#define kCC3Matrix4x4ColumnCount   4

The number of columns in a CC3Matrix4x4 structure.

#define kCC3Matrix4x4ElementCount   16

The number of GLfloat elements in a CC3Matrix4x4 structure.

#define kCC3Matrix4x4RowCount   4

The number of rows in a CC3Matrix4x4 structure.

Function Documentation

static GLfloat CC3Det3x3 ( GLfloat  a1,
GLfloat  a2,
GLfloat  a3,
GLfloat  b1,
GLfloat  b2,
GLfloat  b3,
GLfloat  c1,
GLfloat  c2,
GLfloat  c3 
)
inlinestatic

Returns the determinant of the specified 3x3 matrix values.

| a1 b1 c1 | | a2 b2 c2 | | a3 b3 c3 |

void CC3Matrix3x3CopyInto4x4 ( const CC3Matrix3x3 mtxSrc,
CC3Matrix4x4 mtx 
)

Copies the specified 3x3 matrix into the specified 4x4 matrix, without changing content within the 4x4 matrix that is outside the first three rows and columns.

The fourth column and fourth row of the 4x4 matrix are left unchanged.

void CC3Matrix3x3PopulateFrom4x4 ( CC3Matrix3x3 mtx,
const CC3Matrix4x4 mtxSrc 
)

Populates the specified 3x3 matrix from the specified 4x4 matrix.

The fourth column and row are dropped.

void CC3Matrix4x3CopyInto4x4 ( const CC3Matrix4x3 mtxSrc,
CC3Matrix4x4 mtx 
)

Copies the specified 4x3 matrix into the specified 4x4 matrix, without changing content within the 4x4 matrix that is outside the first three rows.

The fourth row of the 4x4 matrix is left unchanged.

void CC3Matrix4x3PopulateFrom4x4 ( CC3Matrix4x3 mtx,
const CC3Matrix4x4 mtxSrc 
)

Populates the specified 4x3 matrix from the specified 4x4 matrix.

The fourth row is dropped.

static CC3Vector CC3Matrix4x4ExtractForwardDirection ( const CC3Matrix4x4 mtx)
inlinestatic

Extracts and returns the 'forward' direction vector from the rotation component of the specified matrix.

static CC3Quaternion CC3Matrix4x4ExtractQuaternion ( const CC3Matrix4x4 mtx)
inlinestatic

Extracts and returns a unit rotation quaternion from the specified matrix.

This algorithm uses the technique of finding the largest combination of the diagonal elements to select which quaternion element (w,x,y,z) to solve for from the diagonal, and then using that value along with pairs of diagonally-opposite matrix elements to derive the other three quaternion elements. For example, if we want to solve for the quaternion w value first:

  • sum of diagonal elements = c1r1 + c2r2 + c3r3 = (4w^2 - 1).
  • Therefore w = sqrt(c1r1 + c2r2 + c3r3 + 1) / 2.
  • And c3r2 - c2r3 = 4wx, therefore x = (c3r2 - c2r3) / 4w
  • And c1r3 - c3r1 = 4wy, therefore y = (c2r3 - c3r1) / 4w
  • And c3r1 - c1r2 = 4wz, therefore z = (c2r1 - c1r2) / 4w

Similar equations exist for the other combinations of the diagonal elements. Selecting the largest combination helps numerical stability and avoids divide-by-zeros and square roots of negative numbers.

static CC3Vector CC3Matrix4x4ExtractRightDirection ( const CC3Matrix4x4 mtx)
inlinestatic

Extracts and returns the 'right' direction vector from the rotation component of the specified matrix.

static CC3Vector CC3Matrix4x4ExtractRotationYXZ ( const CC3Matrix4x4 mtx)
inlinestatic

Extracts the rotation component of the specified matrix and returns it as an Euler rotation vector, assuming the rotations should be applied in YXZ order, which is the OpenGL default.

Each element of the returned rotation vector represents an Euler angle in degrees.

static CC3Vector CC3Matrix4x4ExtractRotationZYX ( const CC3Matrix4x4 mtx)
inlinestatic

Extracts the rotation component of the specified matrix and returns it as an Euler rotation vector, assuming the rotations should be applied in ZYX order.

Each element of the returned rotation vector represents an Euler angle in degrees.

static CC3Vector CC3Matrix4x4ExtractTranslation ( const CC3Matrix4x4 mtx)
inlinestatic

Extracts and returns the translation vector from the specified matrix.

static CC3Vector CC3Matrix4x4ExtractUpDirection ( const CC3Matrix4x4 mtx)
inlinestatic

Extracts and returns the 'up' direction vector from the rotation component of the specified matrix.

BOOL CC3Matrix4x4InvertAdjoint ( CC3Matrix4x4 m)

Inverts the specified matrix by using the algorithm of calculating the classical adjoint and dividing by the determinant.

The contents of the matrix are changed.

Not all matrices are invertable. Returns whether the matrix was inverted. If this function returns NO, then the matrix was not inverted, and remains unchanged.

Matrix inversion using the classical adjoint algorithm is computationally-expensive. If it is known that the matrix contains only rotation and translation, use the CC3Matrix4x4InvertRigid function instead, which is some 10 to 100 times faster than this function.

void CC3Matrix4x4InvertRigid ( CC3Matrix4x4 mtx)

Inverts the specified matrix using transposition.

The contents of this matrix are changed.

This function assumes that the matrix represents a rigid transformation, containing only rotation and translation. Use this function only if it is known that this is the case.

Inversion of a rigid transform matrix via transposition is very fast, and is consistently 10 to 100 times faster than the classical adjoint algorithm used in the CC3Matrix4x4InvertAdjoint function. It is recommended that this function be used whenever possible.

For an matrix that contains only rigid transforms, we can invert the 3x3 linear matrix by transposing it, and use it to transform the negated translation vector:

M(-1) = | LT -LT(t) |

where LT is the transposed 3x3 linear matrix, and t is the translation vector, both extracted from the 4x4 matrix. For a matrix containing only rigid transforms: L(-1) = LT,

static BOOL CC3Matrix4x4IsIdentity ( const CC3Matrix4x4 mtx)
inlinestatic

Returns whether the specified matrix is an identity matrix (ones on the diagonal, zeros elsewhere).

void CC3Matrix4x4Multiply ( CC3Matrix4x4 mOut,
const CC3Matrix4x4 mL,
const CC3Matrix4x4 mR 
)

Multiplies mL on the left by mR on the right, and stores the result in mOut.

static void CC3Matrix4x4Orthonormalize ( CC3Matrix4x4 mtx,
NSUInteger  startColNum 
)
inlinestatic

Orthonormalizes the rotation component of the specified matrix, using a Gram-Schmidt process, and using the column indicated by the specified column number as the starting point of the orthonormalization process.

The specified column number should be between 1 and 3.

Upon completion, the first three elements of each of the first three columns in the specified matrix will be a unit vector that is orthagonal to the first three elements of the other two columns.

Since the Gram-Schmidt process is biased towards the starting column, if this function will be invoked repeatedly on the same matrix, it is recommended that the starting column number be changed on each invocation of this function, to ensure that the starting bias be averaged across each of the columns over the long term.

void CC3Matrix4x4PopulateFrom3x3 ( CC3Matrix4x4 mtx,
const CC3Matrix3x3 mtxSrc 
)

Populates the specified 4x4 matrix from the specified 3x3 matrix.

A fourth column and row, each containing (0,0,0,1) are added.

void CC3Matrix4x4PopulateFrom4x3 ( CC3Matrix4x4 mtx,
const CC3Matrix4x3 mtxSrc 
)

Populates the specified 4x4 matrix from the specified 4x3 matrix.

A fourth row, containing (0,0,0,1) is added.

static void CC3Matrix4x4PopulateFrom4x4 ( CC3Matrix4x4 mtx,
const CC3Matrix4x4 mtxSrc 
)
inlinestatic

Populates the specified matrix from the specified source matrix.

static void CC3Matrix4x4PopulateFromGLKMatrix4 ( CC3Matrix4x4 mtx,
const GLKMatrix4 *  mtxSrc 
)
inlinestatic

Populates the specified matrix from the specified source GLKMatrix4.

Although CC3Matrix4x4 has the same internal structure as GLKMatrix4, the structures may have different byte alignment requirements. Avoid casting directly between GLKMatrix4 and CC3Matrix4x4, as this is not guaranteed to work reliably.

static void CC3Matrix4x4PopulateFromQuaternion ( CC3Matrix4x4 mtx,
CC3Quaternion  aQuaternion 
)
inlinestatic

Populates the specified matrix from the specified quaternion.

static void CC3Matrix4x4PopulateFromRotationX ( CC3Matrix4x4 mtx,
const GLfloat  degrees 
)
inlinestatic

Populates the specified matrix as a rotation around the X-axis, in degrees.

static void CC3Matrix4x4PopulateFromRotationY ( CC3Matrix4x4 mtx,
const GLfloat  degrees 
)
inlinestatic

Populates the specified matrix as a rotation around the Y-axis, in degrees.

static void CC3Matrix4x4PopulateFromRotationYXZ ( CC3Matrix4x4 mtx,
CC3Vector  aRotation 
)
inlinestatic

Populates the specified matrix as a rotation around three axes, y (yaw), x (pitch) and z (roll), in that order, from the specified Euler angle rotation.

Each Euler angle is specified in degrees.

This rotation places 'up' along the positive Y axis, which is the OpenGL ES default.

static void CC3Matrix4x4PopulateFromRotationZ ( CC3Matrix4x4 mtx,
const GLfloat  degrees 
)
inlinestatic

Populates the specified matrix as a rotation around the Z-axis, in degrees.

static void CC3Matrix4x4PopulateFromRotationZYX ( CC3Matrix4x4 mtx,
CC3Vector  aRotation 
)
inlinestatic

Populates the specified matrix as a rotation around three axes, z (roll), y (yaw), and x (pitch), in that order, from the specified Euler angle rotation.

Each Euler angle is specified in degrees.

This rotation places 'up' along the positive Z axis, which is used by some commercial 3D editors.

static void CC3Matrix4x4PopulateFromScale ( CC3Matrix4x4 mtx,
const CC3Vector  aScale 
)
inlinestatic

Populates the specified matrix from the specified scale.

static void CC3Matrix4x4PopulateFromTranslation ( CC3Matrix4x4 mtx,
const CC3Vector  aTranslation 
)
inlinestatic

Populates the specified matrix from the specified translation.

static void CC3Matrix4x4PopulateIdentity ( CC3Matrix4x4 mtx)
inlinestatic

Populates the specified matrix as an identity matrix (ones on the diagonal, zeros elsewhere).

void CC3Matrix4x4PopulateInfiniteOrthoFrustum ( CC3Matrix4x4 mtx,
const GLfloat  left,
const GLfloat  right,
const GLfloat  top,
const GLfloat  bottom,
const GLfloat  near 
)

Populates the specified matrix as an infinite-depth orthographic projection matrix with the specified frustum dimensions, where the far clipping plane is set at an infinite distance.

void CC3Matrix4x4PopulateInfinitePerspectiveFrustum ( CC3Matrix4x4 mtx,
const GLfloat  left,
const GLfloat  right,
const GLfloat  top,
const GLfloat  bottom,
const GLfloat  near 
)

Populates the specified matrix as an infinite-depth perspective projection matrix with the specified frustum dimensions, where the far clipping plane is set at an infinite distance.

void CC3Matrix4x4PopulateOrthoFrustum ( CC3Matrix4x4 mtx,
const GLfloat  left,
const GLfloat  right,
const GLfloat  top,
const GLfloat  bottom,
const GLfloat  near,
const GLfloat  far 
)

Populates the specified matrix as a orthographic projection matrix with the specified frustum dimensions.

void CC3Matrix4x4PopulatePerspectiveFrustum ( CC3Matrix4x4 mtx,
const GLfloat  left,
const GLfloat  right,
const GLfloat  top,
const GLfloat  bottom,
const GLfloat  near,
const GLfloat  far 
)

Populates the specified matrix as a perspective projection matrix with the specified frustum dimensions.

static void CC3Matrix4x4PopulateToPointTowards ( CC3Matrix4x4 mtx,
const CC3Vector  fwdDirection,
const CC3Vector  upDirection 
)
inlinestatic

Populates the specified matrix so that it will transform a vector pointed down the negative Z-axis to point in the specified forwardDirection, and transform the positive Y-axis to point in the specified upDirection.

static void CC3Matrix4x4PopulateZero ( CC3Matrix4x4 mtx)
inlinestatic

Populates the specified matrix so that all elements are zero.

static void CC3Matrix4x4RotateByQuaternion ( CC3Matrix4x4 mtx,
CC3Quaternion  aQuaternion 
)
inlinestatic

Rotates the specified matrix by the rotation specified in the given quaternion.

Since this operation rotates a matrix that potentially already contains rotations, the new rotation is performed first, followed by the rotation already contained within the specified matrix elements. If the matrix rotations were performed first, the new rotation would be performed in the rotated coordinate system defined by the matrix.

In mathematical terms, the incoming rotation is converted to matrix form, and is left-multiplied to the specified matrix elements.

static void CC3Matrix4x4RotateYXZBy ( CC3Matrix4x4 mtx,
CC3Vector  aRotation 
)
inlinestatic

Rotates the specified matrix by the specified Euler angles in degrees.

Rotation is performed in YXZ order, which is the OpenGL default.

Since this operation rotates a matrix that potentially already contains rotations, the new rotation is performed first, followed by the rotation already contained within the specified matrix elements. If the matrix rotations were performed first, the new rotation would be performed in the rotated coordinate system defined by the matrix.

In mathematical terms, the incoming rotation is converted to matrix form, and is left-multiplied to the specified matrix elements.

static void CC3Matrix4x4RotateZYXBy ( CC3Matrix4x4 mtx,
CC3Vector  aRotation 
)
inlinestatic

Rotates the specified matrix by the specified Euler angles in degrees.

Rotation is performed in ZYX order, which is used by some commercial 3D editors

Since this operation rotates a matrix that potentially already contains rotations, the new rotation is performed first, followed by the rotation already contained within the specified matrix elements. If the matrix rotations were performed first, the new rotation would be performed in the rotated coordinate system defined by the matrix.

In mathematical terms, the incoming rotation is converted to matrix form, and is left-multiplied to the specified matrix elements.

static void CC3Matrix4x4ScaleBy ( CC3Matrix4x4 mtx,
CC3Vector  aScale 
)
inlinestatic

Scales the specified matrix in three dimensions by the specified scaling vector.

Non-uniform scaling can be achieved by specifying different values for each element of the scaling vector.

CC3Vector4 CC3Matrix4x4TransformCC3Vector4 ( const CC3Matrix4x4 mtx,
CC3Vector4  v 
)

Transforms the specified 4D vector using the specified matrix, and returns the transformed vector.

The specified matrix and the original specified vector remain unchanged.

CC3Vector CC3Matrix4x4TransformDirection ( const CC3Matrix4x4 mtx,
CC3Vector  v 
)

Transforms the specified 3D location vector using the specified matrix, and returns the transformed vector.

The location is transformed as if it was a 4D vector with a W value of 0.

The specified matrix and the original specified vector remain unchanged.

CC3Vector CC3Matrix4x4TransformLocation ( const CC3Matrix4x4 mtx,
CC3Vector  v 
)

Transforms the specified 3D location vector using the specified matrix, and returns the transformed vector.

The location is transformed as if it was a 4D vector with a W value of 1.

The specified matrix and the original specified vector remain unchanged.

static void CC3Matrix4x4TranslateBy ( CC3Matrix4x4 mtx,
CC3Vector  aTranslation 
)
inlinestatic

Translates the specified matrix in three dimensions by the specified translation vector.

void CC3Matrix4x4Transpose ( CC3Matrix4x4 mtx)

Transposes the specified matrix.

The contents of the matrix are changed.

static CC3Vector4 CC3Vector4FromCC3Matrix4x4Col ( const CC3Matrix4x4 mtx,
NSUInteger  colIdx 
)
inlinestatic

Returns the column at the specified index from the specified matrix, as a 4D vector suitable for use in use with a 4x4 matrix.

In keeping with matrix math terminology, the index is one-based. The first column of the matrix has an index of one.

static CC3Vector4 CC3Vector4FromCC3Matrix4x4Row ( const CC3Matrix4x4 mtx,
NSUInteger  rowIdx 
)
inlinestatic

Returns the row at the specified index from the specified matrix, as a 4D vector suitable for use in use with a 4x4 matrix.

In keeping with matrix math terminology, the index is one-based. The first column of the matrix has an index of one.

static CC3Vector CC3VectorFromCC3Matrix4x4Col ( const CC3Matrix4x4 mtx,
NSUInteger  colIdx 
)
inlinestatic

Returns the column at the specified index from the specified matrix, as a 3D vecto suitable for use in use with a 3x3 matrix.

The returned vector contains the first 3 elements of the column.

In keeping with matrix math terminology, the index is one-based. The first column of the matrix has an index of one.

static CC3Vector CC3VectorFromCC3Matrix4x4Row ( const CC3Matrix4x4 mtx,
NSUInteger  rowIdx 
)
inlinestatic

Returns the row at the specified index from the specified matrix, as a 3D vector suitable for use in use with a 3x3 matrix.

The returned vector contains the first 3 elements of the row.

In keeping with matrix math terminology, the index is one-based. The first column of the matrix has an index of one.

static void GLKMatrix4PopulateFromCC3Matrix4x4 ( GLKMatrix4 *  mtx,
const CC3Matrix4x4 mtxSrc 
)
inlinestatic

Populates the specified GLKMatrix4 from the specified source matrix.

Although GLKMatrix4 has the same internal structure as CC3Matrix4x4, the structures may have different byte alignment requirements. Avoid casting directly between CC3Matrix4x4 and GLKMatrix3, as this is not guaranteed to work reliably.

NSString* NSStringFromCC3Matrix4x4 ( const CC3Matrix4x4 mtxPtr)

Returns a string description of the specified CC3Matrix4x4, including contents.