AI_TVector2 Class Reference
[Mathematics]
#include <AI_TVector2.h>
Detailed Description
Generic AI_Vector2 class.(C) 2002 RadonLabs GmbH
Public Member Functions | |
AI_TVector2 () | |
constructor 1 | |
AI_TVector2 (const float _x, const float _y) | |
constructor 2 | |
AI_TVector2 (const AI_TVector2 &vec) | |
constructor 3 | |
AI_TVector2 (const float *p) | |
constructor 4 | |
void | set (const float _x, const float _y) |
set elements 1 | |
void | set (const AI_TVector2 &vec) |
set elements 2 | |
void | set (const float *p) |
set elements 3 | |
float | len () const |
return length | |
void | norm () |
normalize | |
void | operator+= (const AI_TVector2 &v0) |
in place add | |
void | operator-= (const AI_TVector2 &v0) |
in place sub | |
void | operator *= (const float s) |
in place scalar mul | |
void | operator/= (const float s) |
in place scalar div | |
bool | isequal (const AI_TVector2 &v, const float tol) const |
fuzzy compare operator | |
int | compare (const AI_TVector2 &v, float tol) const |
fuzzy compare, returns -1, 0, +1 | |
void | rotate (float angle) |
rotate around P(0,0) | |
void | lerp (const AI_TVector2 &v0, float lerpVal) |
inplace linear interpolation | |
void | lerp (const AI_TVector2 &v0, const AI_TVector2 &v1, float lerpVal) |
linear interpolation between v0 and v1 | |
float | dot (const AI_TVector2 &v0) const |
dot product | |
Public Attributes | |
float | x |
float | y |
Constructor & Destructor Documentation
AI_TVector2::AI_TVector2 | ( | ) | [inline] |
constructor 1
AI_TVector2::AI_TVector2 | ( | const float | _x, | |
const float | _y | |||
) | [inline] |
constructor 2
AI_TVector2::AI_TVector2 | ( | const AI_TVector2 & | vec | ) | [inline] |
constructor 3
AI_TVector2::AI_TVector2 | ( | const float * | p | ) | [inline] |
constructor 4
Member Function Documentation
void AI_TVector2::set | ( | const float | _x, | |
const float | _y | |||
) | [inline] |
set elements 1
void AI_TVector2::set | ( | const AI_TVector2 & | vec | ) | [inline] |
set elements 2
void AI_TVector2::set | ( | const float * | p | ) | [inline] |
set elements 3
float AI_TVector2::len | ( | void | ) | const [inline] |
return length
void AI_TVector2::norm | ( | void | ) | [inline] |
normalize
void AI_TVector2::operator+= | ( | const AI_TVector2 & | v0 | ) | [inline] |
in place add
void AI_TVector2::operator-= | ( | const AI_TVector2 & | v0 | ) | [inline] |
in place sub
void AI_TVector2::operator *= | ( | const float | s | ) | [inline] |
in place scalar mul
void AI_TVector2::operator/= | ( | const float | s | ) | [inline] |
in place scalar div
bool AI_TVector2::isequal | ( | const AI_TVector2 & | v, | |
const float | tol | |||
) | const [inline] |
fuzzy compare operator
int AI_TVector2::compare | ( | const AI_TVector2 & | v, | |
float | tol | |||
) | const [inline] |
fuzzy compare, returns -1, 0, +1
void AI_TVector2::rotate | ( | float | angle | ) | [inline] |
rotate around P(0,0)
void AI_TVector2::lerp | ( | const AI_TVector2 & | v0, | |
float | lerpVal | |||
) | [inline] |
inplace linear interpolation
void AI_TVector2::lerp | ( | const AI_TVector2 & | v0, | |
const AI_TVector2 & | v1, | |||
float | lerpVal | |||
) | [inline] |
linear interpolation between v0 and v1
float AI_TVector2::dot | ( | const AI_TVector2 & | v0 | ) | const [inline] |
dot product
Dot product for AI_Vector2
Member Data Documentation
float AI_TVector2::x |
float AI_TVector2::y |
The documentation for this class was generated from the following file: