AI_TVector3 Class Reference
[Mathematics]
#include <AI_TVector3.h>
Detailed Description
Generic AI_Vector3 class. Uses 16 Byte of mem instead of 12 (!)(C) 2002 RadonLabs GmbH
Public Member Functions | |
| AI_TVector3 () | |
| constructor 1 | |
| AI_TVector3 (const float _x, const float _y, const float _z) | |
| constructor 2 | |
| AI_TVector3 (const AI_TVector3 &vec) | |
| constructor 3 | |
| void | set (const float _x, const float _y, const float _z) |
| set elements 1 | |
| void | set (const AI_TVector3 &vec) |
| set elements 2 | |
| float | len () const |
| return length | |
| float | lensquared () const |
| return length squared | |
| void | norm () |
| normalize | |
| void | operator+= (const AI_TVector3 &v0) |
| inplace add | |
| void | operator-= (const AI_TVector3 &v0) |
| inplace sub | |
| void | operator *= (float s) |
| inplace scalar multiplication | |
| bool | operator> (const AI_TVector3 &rhs) |
| true if any of the elements are greater | |
| bool | operator< (const AI_TVector3 &rhs) |
| true if any of the elements are smaller | |
| bool | isequal (const AI_TVector3 &v, float tol) const |
| fuzzy compare, return true/false | |
| int | compare (const AI_TVector3 &v, float tol) const |
| fuzzy compare, returns -1, 0, +1 | |
| void | rotate (const AI_TVector3 &axis, float angle) |
| rotate around axis | |
| void | lerp (const AI_TVector3 &v0, float lerpVal) |
| inplace linear interpolation | |
| void | lerp (const AI_TVector3 &v0, const AI_TVector3 &v1, float lerpVal) |
| linear interpolation between v0 and v1 | |
| AI_TVector3 | findortho () const |
| returns a vector orthogonal to self, not normalized | |
| void | saturate () |
| saturate components between 0 and 1 | |
| float | dot (const AI_TVector3 &v0) const |
| dot product | |
Static Public Member Functions | |
| static float | distance (const AI_TVector3 &v0, const AI_TVector3 &v1) |
| distance between 2 AI_Vector3's | |
Public Attributes | |
| float | x |
| float | y |
| float | z |
Constructor & Destructor Documentation
| AI_TVector3::AI_TVector3 | ( | ) | [inline] |
constructor 1
| AI_TVector3::AI_TVector3 | ( | const float | _x, | |
| const float | _y, | |||
| const float | _z | |||
| ) | [inline] |
constructor 2
| AI_TVector3::AI_TVector3 | ( | const AI_TVector3 & | vec | ) | [inline] |
constructor 3
Member Function Documentation
| void AI_TVector3::set | ( | const float | _x, | |
| const float | _y, | |||
| const float | _z | |||
| ) | [inline] |
set elements 1
| void AI_TVector3::set | ( | const AI_TVector3 & | vec | ) | [inline] |
set elements 2
| float AI_TVector3::len | ( | void | ) | const [inline] |
return length
| float AI_TVector3::lensquared | ( | ) | const [inline] |
return length squared
| void AI_TVector3::norm | ( | void | ) | [inline] |
normalize
| void AI_TVector3::operator+= | ( | const AI_TVector3 & | v0 | ) | [inline] |
inplace add
| void AI_TVector3::operator-= | ( | const AI_TVector3 & | v0 | ) | [inline] |
inplace sub
| void AI_TVector3::operator *= | ( | float | s | ) | [inline] |
inplace scalar multiplication
| bool AI_TVector3::operator> | ( | const AI_TVector3 & | rhs | ) | [inline] |
true if any of the elements are greater
| bool AI_TVector3::operator< | ( | const AI_TVector3 & | rhs | ) | [inline] |
true if any of the elements are smaller
| bool AI_TVector3::isequal | ( | const AI_TVector3 & | v, | |
| float | tol | |||
| ) | const [inline] |
fuzzy compare, return true/false
| int AI_TVector3::compare | ( | const AI_TVector3 & | v, | |
| float | tol | |||
| ) | const [inline] |
fuzzy compare, returns -1, 0, +1
| void AI_TVector3::rotate | ( | const AI_TVector3 & | axis, | |
| float | angle | |||
| ) | [inline] |
rotate around axis
| void AI_TVector3::lerp | ( | const AI_TVector3 & | v0, | |
| float | lerpVal | |||
| ) | [inline] |
inplace linear interpolation
| void AI_TVector3::lerp | ( | const AI_TVector3 & | v0, | |
| const AI_TVector3 & | v1, | |||
| float | lerpVal | |||
| ) | [inline] |
linear interpolation between v0 and v1
| AI_TVector3 AI_TVector3::findortho | ( | ) | const [inline] |
returns a vector orthogonal to self, not normalized
Find a vector that is orthogonal to self. Self should not be (0,0,0). Return value is not normalized.
| void AI_TVector3::saturate | ( | ) | [inline] |
saturate components between 0 and 1
| float AI_TVector3::dot | ( | const AI_TVector3 & | v0 | ) | const [inline] |
dot product
Dot product for AI_Vector3
| float AI_TVector3::distance | ( | const AI_TVector3 & | v0, | |
| const AI_TVector3 & | v1 | |||
| ) | [inline, static] |
distance between 2 AI_Vector3's
Member Data Documentation
| float AI_TVector3::x |
| float AI_TVector3::y |
| float AI_TVector3::z |
The documentation for this class was generated from the following file:
