A wrapper around bullets btVector3 to include conventient conversion functions (e.g.
More...
|
| Vec3 (const core::vector3df &v) |
| Convert an irrlicht vector3df into the internal (bullet) format.
|
|
| Vec3 (const btVector3 &a) |
| Initialises a vector from a btVector3 (or a Vec3).
|
|
| Vec3 () |
| Empty constructor.
|
|
| Vec3 (float x, float y, float z) |
| Creates a 3d vector from three scalars.
|
|
| Vec3 (float x, float y, float z, float w) |
| Creates a 3d vector from three scalars.
|
|
| Vec3 (float x) |
| Initialises a 3d vector from one scalar value, which is used to initialise all components.
|
|
| Vec3 (float heading, const Vec3 &normal) |
| Sets the heading, and computes pitch and roll dependent on the normal it is displayed on.
|
|
void | setHPR (const btQuaternion &q) |
| Sets the heading, pitch, roll of this vector that is used to store a rotation from a quaternion.
|
|
const float & | operator[] (int n) const |
| Returns a reference to the n-th element (x=0, y=1, z=2, w=3).
|
|
float & | operator[] (int n) |
| Returns a reference to the n-th element (x=0, y=1, z=2, w=3).
|
|
const float | getHeading () const |
| Returns the heading of a vector that is used to store a rotation.
|
|
const float | getPitch () const |
| Returns the pitch of a vector that is used to store a rotation.
|
|
const float | getRoll () const |
| Returns the roll of a vector that is used to store a rotation.
|
|
const float | getW () const |
| Returns the W component (bullet vectors contain 4 elements, the last element is usually unused).
|
|
const void | setHeading (float f) |
| Sets the heading of a vector that is used to store a rotation.
|
|
const void | setPitch (float f) |
| Sets the pitch of a vector that is used to store a rotation.
|
|
const void | setRoll (float f) |
| Sets the roll of a vector that is used to store a rotation.
|
|
const core::vector3df & | toIrrVector () const |
| Converts a vec3 into an irrlicht vector (which is a simple type cast).
|
|
const core::vector3df | toIrrHPR () const |
| Converts a bullet HPR value into an irrlicht HPR value.
|
|
const core::vector2df | toIrrVector2d () const |
| Returns the X and Z component as an irrlicht 2d vector.
|
|
void | degreeToRad () |
| Converts degree values stored in this vec3 to radians.
|
|
Vec3 & | operator= (const btVector3 &a) |
| Sets this = a.
|
|
Vec3 & | operator= (const btQuaternion &q) |
| Sets the rotation given by the quaternion as HPR vector.
|
|
bool | operator== (const Vec3 &other) const |
| Operator== of btQuadWord also compares m_floats[3], which is not useful (and wrong in certain circumstances).
|
|
bool | operator!= (const Vec3 &other) const |
| Operator!= of btQuadWord also compares m_floats[3], which is not useful (and wrong in certain circumstances).
|
|
Vec3 | operator- (const Vec3 &v1) const |
| Computes this = this - v1.
|
|
Vec3 | operator- (const btVector3 v1) const |
| Computes this = this - v1.
|
|
float | length2_2d () const |
| Helper functions to treat this vec3 as a 2d vector.
|
|
float | length_2d () const |
| Returns the length of this vector in the plane, i.e.
|
|
void | max (const Vec3 &a) |
| Sets this = max(this, a) componentwise.
|
|
void | min (const Vec3 &a) |
| Sets this = min(this, a) componentwise.
|
|
float | sideOfLine2D (const Vec3 &start, const Vec3 &end) const |
| Determines which side of a line this point is.
|
|
float | sideofPlane (const Vec3 &x1, const Vec3 &x2, const Vec3 &x3) const |
|
A wrapper around bullets btVector3 to include conventient conversion functions (e.g.
between btVector3 and the graphics specific 3d vector).