Functions

CC3MatrixMath.h File Reference

#import "CC3Foundation.h"

Functions

static GLfloat CC3Det2x2 (GLfloat a1, GLfloat a2, GLfloat b1, GLfloat b2)
static GLfloat CC3Det3x3 (GLfloat a1, GLfloat a2, GLfloat a3, GLfloat b1, GLfloat b2, GLfloat b3, GLfloat c1, GLfloat c2, GLfloat c3)
static void CC3Mat4Multiply (GLfloat *mOut, const GLfloat *mL, const GLfloat *mR)
static void kmMat4RotationQuaternion (GLfloat *m, const CC3Vector4 q)
static void kmMat4RotationX (GLfloat *m, const GLfloat degrees)
static void kmMat4RotationY (GLfloat *m, const GLfloat degrees)
static void kmMat4RotationYXZ (GLfloat *m, CC3Vector aRotation)
static void kmMat4RotationZ (GLfloat *m, const GLfloat degrees)
static void kmMat4RotationZYX (GLfloat *m, CC3Vector aRotation)
static void kmMat4Transformation (GLfloat *m, const CC3Vector aTranslation, const CC3Vector aRotation, const CC3Vector aScale)

Detailed Description


Function Documentation

static GLfloat CC3Det2x2 ( GLfloat  a1,
GLfloat  a2,
GLfloat  b1,
GLfloat  b2 
) [inline, static]

Returns the determinant of the specified matrix values.

| a1 b1 | | a2 b2 |

static GLfloat CC3Det3x3 ( GLfloat  a1,
GLfloat  a2,
GLfloat  a3,
GLfloat  b1,
GLfloat  b2,
GLfloat  b3,
GLfloat  c1,
GLfloat  c2,
GLfloat  c3 
) [inline, static]

Returns the determinant of the specified matrix values.

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

static void CC3Mat4Multiply ( GLfloat *  mOut,
const GLfloat *  mL,
const GLfloat *  mR 
) [inline, static]

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

static void kmMat4RotationQuaternion ( GLfloat *  m,
const CC3Vector4  q 
) [inline, static]

Builds a rotation matrix from a quaternion to a rotation matrix, stores the result in pOut and returns the result.

static void kmMat4RotationX ( GLfloat *  m,
const GLfloat  degrees 
) [inline, static]

Builds a rotation matrix around the X-axis, stores the result in pOut and returns the result.

static void kmMat4RotationY ( GLfloat *  m,
const GLfloat  degrees 
) [inline, static]

Builds a rotation matrix around the Y-axis, stores the result in pOut and returns the result.

static void kmMat4RotationYXZ ( GLfloat *  m,
CC3Vector  aRotation 
) [inline, static]

Builds a rotation matrix that rotates around all three axes, y (yaw), x (pitch) and z (roll), in that order, stores the result in 4x4 GL matrix m and returns the result.

This algorithm matches up along the positive Y axis, which is the OpenGL ES default.

static void kmMat4RotationZ ( GLfloat *  m,
const GLfloat  degrees 
) [inline, static]

Builds a rotation matrix around the Z-axis, stores the result in pOut and returns the result.

static void kmMat4RotationZYX ( GLfloat *  m,
CC3Vector  aRotation 
) [inline, static]

Builds a rotation matrix that rotates around all three axes z (roll), y (yaw), and x (pitch), in that order, stores the result in pOut and returns the result This algorithm matches up along the positive Z axis, which is used by some commercial 3D worlds.

static void kmMat4Transformation ( GLfloat *  m,
const CC3Vector  aTranslation,
const CC3Vector  aRotation,
const CC3Vector  aScale 
) [inline, static]

Builds a transformation matrix that translates, rotates and scales according to the specified vectors, stores the result in pOut and returns the result.