#include <CC3Foundation.h>
Public Attributes | |
GLfloat | x |
GLfloat | y |
GLfloat | z |
A vector in 3D space.
Although CC3Vector has the same internal structure as GLKVector3, the structures may have different byte alignment requirements. Avoid casting directly between GLKVector3 and CC3Vector, as this is not guaranteed to work reliably. Instead, use the functions CC3VectorFromGLKVector3 and GLKVector3FromCC3Vector to convert between the two structures.
You can, however, reliably copy an array of GLKVector3s to an array of CC3Vectors, and vice-versa, by simply using memcpy, or equivalent memory copying function. This is also true of single CC3Vector and GLKVector3 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 CC3Vector::x |
The X-componenent of the vector.
GLfloat CC3Vector::y |
The Y-componenent of the vector.
GLfloat CC3Vector::z |
The Z-componenent of the vector.