AI_TVector4 Class Reference
[Mathematics]
#include <AI_TVector4.h>
Detailed Description
A generic AI_Vector4 class.(C) 2002 RadonLabs GmbH
Public Types | |
enum | component { X = (1<<0), Y = (1<<1), Z = (1<<2), W = (1<<3) } |
Public Member Functions | |
AI_TVector4 () | |
constructor 1 | |
AI_TVector4 (const float _x, const float _y, const float _z, const float _w) | |
constructor 2 | |
AI_TVector4 (const AI_TVector4 &vec) | |
constructor 3 | |
AI_TVector4 (const AI_TVector3 &vec3) | |
constructor from AI_Vector3 (w will be set to 1.0) | |
void | set (const float _x, const float _y, const float _z, const float _w) |
set elements 1 | |
void | set (const AI_TVector4 &v) |
set elements 2 | |
void | set (const AI_TVector3 &v) |
set to AI_Vector3 (w will be set to 1.0) | |
float | len () const |
return length | |
void | norm () |
normalize | |
void | operator+= (const AI_TVector4 &v) |
inplace add | |
void | operator-= (const AI_TVector4 &v) |
inplace sub | |
void | operator *= (const float s) |
inplace scalar mul | |
AI_TVector4 & | operator= (const AI_TVector3 &v) |
AI_Vector3 assignment operator (w set to 1.0f). | |
bool | isequal (const AI_TVector4 &v, float tol) const |
fuzzy compare | |
int | compare (const AI_TVector4 &v, float tol) const |
fuzzy compare, return -1, 0, +1 | |
void | minimum (const AI_TVector4 &v) |
set own components to minimum | |
void | maximum (const AI_TVector4 &v) |
set own components to maximum | |
void | setcomp (float val, int mask) |
set component float value by mask | |
float | getcomp (int mask) |
get component float value by mask | |
int | mincompmask () const |
get write mask for smallest component | |
void | lerp (const AI_TVector4 &v0, float lerpVal) |
inplace linear interpolation | |
void | lerp (const AI_TVector4 &v0, const AI_TVector4 &v1, float lerpVal) |
linear interpolation between v0 and v1 | |
void | saturate () |
saturate components between 0 and 1 | |
float | dot (const AI_TVector4 &v0) const |
dot product | |
Public Attributes | |
float | x |
float | y |
float | z |
float | w |
Member Enumeration Documentation
Constructor & Destructor Documentation
AI_TVector4::AI_TVector4 | ( | ) | [inline] |
constructor 1
AI_TVector4::AI_TVector4 | ( | const float | _x, | |
const float | _y, | |||
const float | _z, | |||
const float | _w | |||
) | [inline] |
constructor 2
AI_TVector4::AI_TVector4 | ( | const AI_TVector4 & | vec | ) | [inline] |
constructor 3
AI_TVector4::AI_TVector4 | ( | const AI_TVector3 & | vec3 | ) | [inline] |
constructor from AI_Vector3 (w will be set to 1.0)
Member Function Documentation
void AI_TVector4::set | ( | const float | _x, | |
const float | _y, | |||
const float | _z, | |||
const float | _w | |||
) | [inline] |
set elements 1
void AI_TVector4::set | ( | const AI_TVector4 & | v | ) | [inline] |
set elements 2
void AI_TVector4::set | ( | const AI_TVector3 & | v | ) | [inline] |
set to AI_Vector3 (w will be set to 1.0)
float AI_TVector4::len | ( | void | ) | const [inline] |
return length
void AI_TVector4::norm | ( | void | ) | [inline] |
normalize
void AI_TVector4::operator+= | ( | const AI_TVector4 & | v | ) | [inline] |
inplace add
void AI_TVector4::operator-= | ( | const AI_TVector4 & | v | ) | [inline] |
inplace sub
void AI_TVector4::operator *= | ( | const float | s | ) | [inline] |
inplace scalar mul
AI_TVector4 & AI_TVector4::operator= | ( | const AI_TVector3 & | v | ) | [inline] |
AI_Vector3 assignment operator (w set to 1.0f).
bool AI_TVector4::isequal | ( | const AI_TVector4 & | v, | |
float | tol | |||
) | const [inline] |
fuzzy compare
int AI_TVector4::compare | ( | const AI_TVector4 & | v, | |
float | tol | |||
) | const [inline] |
fuzzy compare, return -1, 0, +1
void AI_TVector4::minimum | ( | const AI_TVector4 & | v | ) | [inline] |
set own components to minimum
void AI_TVector4::maximum | ( | const AI_TVector4 & | v | ) | [inline] |
set own components to maximum
void AI_TVector4::setcomp | ( | float | val, | |
int | mask | |||
) | [inline] |
set component float value by mask
float AI_TVector4::getcomp | ( | int | mask | ) | [inline] |
get component float value by mask
int AI_TVector4::mincompmask | ( | ) | const [inline] |
get write mask for smallest component
void AI_TVector4::lerp | ( | const AI_TVector4 & | v0, | |
float | lerpVal | |||
) | [inline] |
inplace linear interpolation
void AI_TVector4::lerp | ( | const AI_TVector4 & | v0, | |
const AI_TVector4 & | v1, | |||
float | lerpVal | |||
) | [inline] |
linear interpolation between v0 and v1
void AI_TVector4::saturate | ( | ) | [inline] |
saturate components between 0 and 1
float AI_TVector4::dot | ( | const AI_TVector4 & | v0 | ) | const [inline] |
dot product
Dot product for AI_Vector4
Member Data Documentation
float AI_TVector4::x |
float AI_TVector4::y |
float AI_TVector4::z |
float AI_TVector4::w |
The documentation for this class was generated from the following file: