Flair
Framework Libre Air
|
Class defining a 3D vector. More...
#include <Vector3D.h>
Public Member Functions | |
Vector3D (float x=0, float y=0, float z=0) | |
Constructor. More... | |
~Vector3D () | |
Destructor. More... | |
void | RotateX (float value) |
x axis rotation More... | |
void | RotateXDeg (float value) |
x axis rotation More... | |
void | RotateY (float value) |
y axis rotation More... | |
void | RotateYDeg (float value) |
y axis rotation More... | |
void | RotateZ (float value) |
z axis rotation More... | |
void | RotateZDeg (float value) |
z axis rotation More... | |
void | Rotate (const RotationMatrix &matrix) |
rotation More... | |
void | Rotate (const Quaternion &quaternion) |
rotation More... | |
void | To2Dxy (Vector2D &vector) const |
Convert to a Vector2D. More... | |
Vector2D | To2Dxy (void) const |
Convert to a Vector2D. More... | |
float | GetNorm (void) const |
Norm. More... | |
void | Normalize (void) |
Normalize. More... | |
void | Saturate (const Vector3D &min, const Vector3D &max) |
Saturate. More... | |
void | Saturate (float min, float max) |
Saturate. More... | |
void | Saturate (const Vector3D &value) |
Saturate. More... | |
void | Saturate (float value) |
Saturate. More... | |
float & | operator[] (size_t idx) |
const float & | operator[] (size_t idx) const |
Vector3D & | operator= (const Vector3D &vector) |
Vector3D & | operator+= (const Vector3D &vector) |
Vector3D & | operator-= (const Vector3D &vector) |
Public Attributes | |
float | x |
x More... | |
float | y |
y More... | |
float | z |
z More... | |
Class defining a 3D vector.
flair::core::Vector3D::Vector3D | ( | float | x = 0 , |
float | y = 0 , |
||
float | z = 0 |
||
) |
flair::core::Vector3D::~Vector3D | ( | ) |
Destructor.
void flair::core::Vector3D::RotateX | ( | float | value | ) |
x axis rotation
value | rotation value in radians |
void flair::core::Vector3D::RotateXDeg | ( | float | value | ) |
x axis rotation
value | rotation value in degrees |
void flair::core::Vector3D::RotateY | ( | float | value | ) |
y axis rotation
value | rotation value in radians |
void flair::core::Vector3D::RotateYDeg | ( | float | value | ) |
y axis rotation
value | rotation value in degrees |
void flair::core::Vector3D::RotateZ | ( | float | value | ) |
z axis rotation
value | rotation value in radians |
void flair::core::Vector3D::RotateZDeg | ( | float | value | ) |
z axis rotation
value | rotation value in degrees |
void flair::core::Vector3D::Rotate | ( | const RotationMatrix & | matrix | ) |
rotation
matrix | rotation matrix |
void flair::core::Vector3D::Rotate | ( | const Quaternion & | quaternion | ) |
rotation
Compute a rotation from a quaternion. This method uses a rotation matrix internaly.
quaternion | quaternion |
void flair::core::Vector3D::To2Dxy | ( | Vector2D & | vector | ) | const |
Vector2D flair::core::Vector3D::To2Dxy | ( | void | ) | const |
float flair::core::Vector3D::GetNorm | ( | void | ) | const |
Norm.
void flair::core::Vector3D::Normalize | ( | void | ) |
Normalize.
Saturate.
Saturate between min and max
min | minimum value |
max | maximum value |
void flair::core::Vector3D::Saturate | ( | float | min, |
float | max | ||
) |
Saturate.
Saturate between min and max
min | minimum Vector3D(min,min,min) value |
max | maximum Vector3D(max,max,max) value |
void flair::core::Vector3D::Saturate | ( | const Vector3D & | value | ) |
void flair::core::Vector3D::Saturate | ( | float | value | ) |
Saturate.
Saturate between -abs(Vector3D(value,value,value)) and abs(Vector3D(value,value,value))
value | saturation Vector3D(value,value,value) |
float flair::core::Vector3D::x |
x
float flair::core::Vector3D::y |
y
float flair::core::Vector3D::z |
z