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

#import <CC3LinearMatrix.h>

Inheritance diagram for CC3LinearMatrix:
Inheritance graph
[legend]

Instance Methods

(void) - populateFromFrustumLeft:andRight:andTop:andBottom:andNear:
 
(void) - populateFromFrustumLeft:andRight:andTop:andBottom:andNear:andFar:
 
(void) - populateFromTranslation:
 
(void) - populateOrthoFromFrustumLeft:andRight:andTop:andBottom:andNear:
 
(void) - populateOrthoFromFrustumLeft:andRight:andTop:andBottom:andNear:andFar:
 
(void) - populateToLookAt:withEyeAt:withUp:
 
(CC3Vector4- transformHomogeneousVector:
 
(CC3Vector- transformLocation:
 
- 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) - populateIdentity
 
(void) - populateToPointTowards:withUp:
 
(void) - populateZero
 
(void) - rotateBy:
 
(void) - rotateByQuaternion:
 
(void) - scaleBy:
 
(CC3Vector- transformDirection:
 
(CC3Ray- transformRay:
 
(void) - translateBy:
 
(void) - transpose
 

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

CC3LinearMatrix is a 3x3 matrix that can represent 3D linear transforms such as rotation, scaling, reflection and shearing.

Matrices of this class cannot represent 3D translation.

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

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.

Linear 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.

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

Implements CC3Matrix.

- (void) populateFromTranslation: (CC3Vector aTranslation

Populates this instance from the specified translation vector.

Since linear matrices are unaffected by translation, the effect of this method is to populate this matrix as a identity matrix.

Implements CC3Matrix.

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

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

Linear matrices cannot support orthographic projection. This method throws an assertion exception.

Implements CC3Matrix.

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

Populates this matrix as a parallel orthographic matrix with the specified frustum dimensions.

Linear matrices cannot support orthographic projection. This method throws an assertion exception.

Implements CC3Matrix.

- (void) populateToLookAt: (CC3Vector targetLocation
withEyeAt: (CC3Vector eyeLocation
withUp: (CC3Vector upDirection 

Populates this matrix so that it will transform a vector between the targetLocation and the eyeLocation to point along the negative Z-axis, and transform the specified upDirection to the positive Y-axis.

This transform works in the direction from model-space to view-space, and therefore includes an implied inversion relative to the directToward:withUp: method. When applied to the camera, this has the effect of locating the camera at the eyeLocation and pointing it at the targetLocation, while orienting it so that 'up' appears to be in the upDirection, from the viewer's perspective.

Since linear matrices are unaffected by translation, this matrix will be populated to look in the correct direction as if the eye were at the specified coordinate, but will not be looking at the target location, as the matrix cannot be translated to the location of the eye. In order to bring the targetLocation into view, this matrix must be applied to a matrix that can support translation to the eyeLocation.

Implements CC3Matrix.

- (CC3Vector4) transformHomogeneousVector: (CC3Vector4 aVector

Transforms the specified homogeneous vector using this matrix, and returns the transformed vector.

Since linear matrices have no translation component, the vector is transformed as a direction, regardless of the W component of the homogeneous vector. However, the W component of the returned vector will be the same as that of the incoming vector.

This matrix and the original specified homogeneous vector remain unchanged.

Implements CC3Matrix.

- (CC3Vector) transformLocation: (CC3Vector aLocation

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

Since linear matrices have no translation component, the location is transformed as if it were a direction.

This matrix and the original specified location remain unchanged.

Implements CC3Matrix.


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