v2.0.2
Public Attributes | List of all members
CC3Matrix3x3 Union Reference

#include <CC3Matrix3x3.h>

Public Attributes

GLfloat colRow [kCC3Matrix3x3ColumnCount][kCC3Matrix3x3RowCount]
 
CC3Vector columns [kCC3Matrix3x3ColumnCount]
 
GLfloat elements [kCC3Matrix3x3ElementCount]
 
GLfloat c1r1
 
GLfloat c1r2
 
GLfloat c1r3
 
GLfloat c2r1
 
GLfloat c2r2
 
GLfloat c2r3
 
GLfloat c3r1
 
GLfloat c3r2
 
GLfloat c3r3
 
CC3Vector col1
 
CC3Vector col2
 
CC3Vector col3
 

Detailed Description

A structure representing a 3x3 matrix, with data stored in column-major order.

CC3Matrix3x3 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 CC3Matrix3x3 has the same internal structure as GLKMatrix3, the structures may have different byte alignment requirements. Avoid casting directly between GLKMatrix3 and CC3Matrix3x3, as this is not guaranteed to work reliably. Instead, use the functions CC3Matrix3x3PopulateFromGLKMatrix3 and GLKMatrix3PopulateFromCC3Matrix3x3 to convert between the two structures.

You can, however, reliably copy an array of GLKMatrix3s to an array of CC3Matrix3x3s, and vice-versa, by simply using memcpy, or equivalent memory copying function. This is also true of single CC3Matrix3x3 and GLKMatrix3 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.

Member Data Documentation

GLfloat CC3Matrix3x3::c1r1

The element at column 1, row 1.

GLfloat CC3Matrix3x3::c1r2

The element at column 1, row 2.

GLfloat CC3Matrix3x3::c1r3

The element at column 1, row 3.

GLfloat CC3Matrix3x3::c2r1

The element at column 2, row 1.

GLfloat CC3Matrix3x3::c2r2

The element at column 2, row 2.

GLfloat CC3Matrix3x3::c2r3

The element at column 2, row 3.

GLfloat CC3Matrix3x3::c3r1

The element at column 3, row 1.

GLfloat CC3Matrix3x3::c3r2

The element at column 3, row 2.

GLfloat CC3Matrix3x3::c3r3

The element at column 3, row 3.

CC3Vector CC3Matrix3x3::col1

The first column as a 3D vector.

CC3Vector CC3Matrix3x3::col2

The second column as a 3D vector.

CC3Vector CC3Matrix3x3::col3

The third column as a 3D vector.

GLfloat CC3Matrix3x3::colRow[kCC3Matrix3x3ColumnCount][kCC3Matrix3x3RowCount]

The elements as zero-based indexed columns and rows.

CC3Vector CC3Matrix3x3::columns[kCC3Matrix3x3ColumnCount]

The three columns as zero-based indexed 3D vectors.

GLfloat CC3Matrix3x3::elements[kCC3Matrix3x3ElementCount]

The elements in array form.

You can also simply cast the entire union to an array of GLfloats.


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