v2.0.2
Instance Methods | List of all members
CC3AffineMatrix Class Reference

#import <CC3AffineMatrix.h>

Inheritance diagram for CC3AffineMatrix:
Inheritance graph
[legend]

Instance Methods

(void) - populateFromFrustumLeft:andRight:andTop:andBottom:andNear:
 
(void) - populateFromFrustumLeft:andRight:andTop:andBottom:andNear:andFar:
 
(void) - transpose
 
- Instance Methods inherited from CC3Matrix
(CC3Vector- extractForwardDirection
 
(CC3Quaternion- extractQuaternion
 
(CC3Vector- extractRightDirection
 
(CC3Vector- extractRotation
 
(CC3Vector- extractTranslation
 
(CC3Vector- extractUpDirection
 
(id) - init
 
(BOOL) - invert
 
(BOOL) - invertAdjoint
 
(void) - invertRigid
 
(void) - leftMultiplyBy:
 
(void) - leftMultiplyByCC3Matrix3x3:
 
(void) - leftMultiplyByCC3Matrix4x3:
 
(void) - leftMultiplyByCC3Matrix4x4:
 
(void) - leftMultiplyIntoCC3Matrix3x3:
 
(void) - leftMultiplyIntoCC3Matrix4x3:
 
(void) - leftMultiplyIntoCC3Matrix4x4:
 
(void) - multiplyBy:
 
(void) - multiplyByCC3Matrix3x3:
 
(void) - multiplyByCC3Matrix4x3:
 
(void) - multiplyByCC3Matrix4x4:
 
(void) - multiplyIntoCC3Matrix3x3:
 
(void) - multiplyIntoCC3Matrix4x3:
 
(void) - multiplyIntoCC3Matrix4x4:
 
(void) - orthonormalizeRotationStartingWith:
 
(void) - populateCC3Matrix3x3:
 
(void) - populateCC3Matrix4x3:
 
(void) - populateCC3Matrix4x4:
 
(void) - populateFrom:
 
(void) - populateFromCC3Matrix3x3:
 
(void) - populateFromCC3Matrix4x3:
 
(void) - populateFromCC3Matrix4x4:
 
(void) - populateFromQuaternion:
 
(void) - populateFromRotation:
 
(void) - populateFromScale:
 
(void) - populateFromTranslation:
 
(void) - populateIdentity
 
(void) - populateOrthoFromFrustumLeft:andRight:andTop:andBottom:andNear:
 
(void) - populateOrthoFromFrustumLeft:andRight:andTop:andBottom:andNear:andFar:
 
(void) - populateToLookAt:withEyeAt:withUp:
 
(void) - populateToPointTowards:withUp:
 
(void) - populateZero
 
(void) - rotateBy:
 
(void) - rotateByQuaternion:
 
(void) - scaleBy:
 
(CC3Vector- transformDirection:
 
(CC3Vector4- transformHomogeneousVector:
 
(CC3Vector- transformLocation:
 
(CC3Ray- transformRay:
 
(void) - translateBy:
 

Additional Inherited Members

- Class Methods inherited from CC3Matrix
(id) + matrix
 
(id) + matrixByMultiplying:by:
 
- Properties inherited from CC3Matrix
BOOL isDirty
 
BOOL isIdentity
 
BOOL isRigid
 

Detailed Description

CC3AffineMatrix is a 4x3 matrix that can represent affine transforms such as rotation, scaling, reflection, shearing, and translation.

Affine matrices differ from linear matrices in that affine matrices can perform translation transformations.

Internally, the dimensions of this matrix are four columns by three rows. Data is held in a CC3Matrix4x3 structure of 12 GLfloat elements in column-major order. For situations requiring only 3D affine transformations, this offers a storage savings over using a full 4x4 matrix.

Although this matrix has only three rows, it behaves like a square matrix with four columns and four rows, with the missing row always taken to contain (0, 0, 0, 1). Since all affine transforms never change this last row, the requirement to store this last row is dropped in order to reduce memory and calculation overhead. Where operations require this last row to be present, it is temporarily generated automatically.

Method Documentation

- (void) populateFromFrustumLeft: (GLfloat)  left
andRight: (GLfloat)  right
andTop: (GLfloat)  top
andBottom: (GLfloat)  bottom
andNear: (GLfloat)  near 

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

Affine matrices cannot support perspective projection. This method throws an assertion exception.

Implements CC3Matrix.

- (void) populateFromFrustumLeft: (GLfloat)  left
andRight: (GLfloat)  right
andTop: (GLfloat)  top
andBottom: (GLfloat)  bottom
andNear: (GLfloat)  near
andFar: (GLfloat)  far 

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

Affine matrices cannot support perspective projection. This method throws an assertion exception.

Implements CC3Matrix.

- (void) transpose

Transposes this matrix.

The contents of this matrix are changed.

Since the affine matrix does not store the fourth row, transposing an affine matrix will result in the contents of the fourth column being lost. After the transposition, the contents of both the forth column and the (implied) fourth row will contain (0,0,0,1).

If this is not the desired result, use the contents of this matrix to populate either an instance of CC3ProjectionMatrix, or a CC3Matrix4x4 structure, and take the transpose of that matrix.

Implements CC3Matrix.


The documentation for this class was generated from the following file: