#include <CC3Matrix4x4.h>
Public Attributes | |
GLfloat | colRow [kCC3Matrix4x4ColumnCount][kCC3Matrix4x4RowCount] |
CC3Vector4 | columns [kCC3Matrix4x4ColumnCount] |
GLfloat | elements [kCC3Matrix4x4ElementCount] |
GLfloat | c1r1 |
GLfloat | c1r2 |
GLfloat | c1r3 |
GLfloat | c1r4 |
GLfloat | c2r1 |
GLfloat | c2r2 |
GLfloat | c2r3 |
GLfloat | c2r4 |
GLfloat | c3r1 |
GLfloat | c3r2 |
GLfloat | c3r3 |
GLfloat | c3r4 |
GLfloat | c4r1 |
GLfloat | c4r2 |
GLfloat | c4r3 |
GLfloat | c4r4 |
CC3Vector4 | col1 |
CC3Vector4 | col2 |
CC3Vector4 | col3 |
CC3Vector4 | col4 |
A structure representing a 4x4 matrix, with data stored in column-major order.
CC3Matrix4x4 offers several ways to access the matrix content. Content can be accessed by element array index, by element column and row number, or as column vectors.
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. Instead, use the functions CC3Matrix4x4PopulateFromGLKMatrix4 and GLKMatrix4PopulateFromCC3Matrix4x4 to convert between the two structures.
You can, however, reliably copy an array of GLKMatrix4s to an array of CC3Matrix4x4s, and vice-versa, by simply using memcpy, or equivalent memory copying function. This is also true of single CC3Matrix4x4 and GLKMatrix4 structures. Copying is successful because the array or pointer declarations will ensure the respective byte-alignment requirements, and since the internal structures are identical, the contents of the copy will be identical.
GLfloat CC3Matrix4x4::c1r1 |
The element at column 1, row 1.
GLfloat CC3Matrix4x4::c1r2 |
The element at column 1, row 2.
GLfloat CC3Matrix4x4::c1r3 |
The element at column 1, row 3.
GLfloat CC3Matrix4x4::c1r4 |
The element at column 1, row 4.
GLfloat CC3Matrix4x4::c2r1 |
The element at column 2, row 1.
GLfloat CC3Matrix4x4::c2r2 |
The element at column 2, row 2.
GLfloat CC3Matrix4x4::c2r3 |
The element at column 2, row 3.
GLfloat CC3Matrix4x4::c2r4 |
The element at column 2, row 4.
GLfloat CC3Matrix4x4::c3r1 |
The element at column 3, row 1.
GLfloat CC3Matrix4x4::c3r2 |
The element at column 3, row 2.
GLfloat CC3Matrix4x4::c3r3 |
The element at column 3, row 3.
GLfloat CC3Matrix4x4::c3r4 |
The element at column 3, row 4.
GLfloat CC3Matrix4x4::c4r1 |
The element at column 4, row 1.
GLfloat CC3Matrix4x4::c4r2 |
The element at column 4, row 2.
GLfloat CC3Matrix4x4::c4r3 |
The element at column 4, row 3.
GLfloat CC3Matrix4x4::c4r4 |
The element at column 3, row 4.
CC3Vector4 CC3Matrix4x4::col1 |
The first column as a 4D vector.
CC3Vector4 CC3Matrix4x4::col2 |
The second column as a 4D vector.
CC3Vector4 CC3Matrix4x4::col3 |
The third column as a 4D vector.
CC3Vector4 CC3Matrix4x4::col4 |
The fourth column as a 4D vector.
GLfloat CC3Matrix4x4::colRow[kCC3Matrix4x4ColumnCount][kCC3Matrix4x4RowCount] |
The elements as zero-based indexed columns and rows.
CC3Vector4 CC3Matrix4x4::columns[kCC3Matrix4x4ColumnCount] |
The four columns as zero-based indexed 4D vectors.
GLfloat CC3Matrix4x4::elements[kCC3Matrix4x4ElementCount] |
The elements in array form.
You can also simply cast the entire union to an array of GLfloats.