Vec3
The vec3 class defines a three-dimensional vector.
You can use the [] operator to access vector components as follows:
[code]Vec3 v = Vec3(3,4,5);
float f = v[1]; //gets the y component of the vector
System::Print(f); //prints "4"[/code]
A dVec3 class also exists. It is identical to the Vec3 class, except that its members use double-precision floating points (double) for members instead of the 32-bit float data type.
Members
- union{number x, r;}
- union{number y,g;}
- union{number z,b;}
Functions