A simple 4x4 Matrix. More...
#import <Matrix4x4.h>
Public Member Functions | |
(id) | - initEmptyMatrix |
Initializer for an identity matrix. | |
(id) | - initWithMatrix: |
Initializer for a matrix based on a specified Matrix4x4. | |
(void) | - setRotateX: |
Sets this matrix to be a rotation matrix in along the x axis, whereas the angle is defined in radiant. | |
(void) | - setRotateY: |
Sets this matrix to be a rotation matrix in along the y axis, whereas the angle is defined in radiant. | |
(void) | - setRotateZ: |
Sets this matrix to be a rotation matrix in along the z axis, whereas the angle is defined in radiant. | |
(void) | - leftMult: |
Multiply the specified Matrix4x4 to this Matrix from left. | |
(float *) | - getValues |
Returns a pointer to a 1dim float array with 16 entries, containing the values of this Matrix. | |
(void) | - transform: |
Transforms the specified 4dim vector using this Matrix. | |
(void) | - scaleX:Y:Z: |
Scales this Matrix in x/y/z direction by the specified values. | |
(void) | - translateX:Y:Z: |
Translates the Matrix in x/y/z direction by the specified values. | |
(void) | - transform: [implementation] |
Static Public Member Functions | |
(Matrix4x4 *) | + createEmptyMatrix |
Convenience allocator to create an identity matrix. | |
(Matrix4x4 *) | + createWithMatrix: |
Convenience allocator to create a matrix based on a specified Matrix4x4. | |
Protected Attributes | |
GLfloat | values [16] |
The values of this Matrix4x4. |
A simple 4x4 Matrix.
Provides two convenience allocators and methods to create rotation matrices. Furthermore it provides left mult of matrices and transforming of 4dim vectors.
- (void) leftMult: | (Matrix4x4 *) | left |
- (void) transform: | (float *) | vector |
Transforms the specified 4dim vector using this Matrix.
Note that the vector specified will be changed.