ADTF_DISPLAY_TOOLBOX
3.8.0 (ADTF 3.14.3)
|
3D vector class. More...
Public Member Functions | |
cVector3 () | |
Constructor. | |
cVector3 (const IVector3 *pVector3) | |
constructor from IVector3 More... | |
cVector3 (const tFloat64 f64X, const tFloat64 f64Y, const tFloat64 f64Z) | |
Constructor. More... | |
tVoid | Release () |
Releases this vector. | |
OPT_INLINE void | Set (const cVector3 &Vector) |
Set vector to the given value. More... | |
OPT_INLINE void | Set (const tFloat64 Value) |
Set vector to the given value. More... | |
OPT_INLINE void | Set (const tFloat64 f64X, const tFloat64 f64Y, const tFloat64 f64Z) |
Set vector to the given value. More... | |
OPT_INLINE void | Zero () |
Set vector to zero. | |
OPT_INLINE void | Add (const cVector3 &Vector) |
Add the given vector to the current one. More... | |
OPT_INLINE void | Sub (const cVector3 &Vector) |
Subtract the given vector from the current one. More... | |
OPT_INLINE void | Scale (const tFloat64 Value) |
Scale the current vector by the given value. More... | |
OPT_INLINE void | Scale (const cVector3 &Vector) |
Scale the current vector by the given one. More... | |
OPT_INLINE cVector3 | Scalar (const cVector3 &Vector) const |
Multiply every coordinate of the current vector with the corresponding coordinate from the given one. More... | |
OPT_INLINE cVector3 | Multiply (const cVector3 &Vector) const |
Cross product of the current vector and the given one. More... | |
tFloat | Length () const |
Calculate the length of the current vector. More... | |
void | Normalize () |
Normalize the current vector so that the length becomes one. | |
void | Dump () |
Dump the current vector to stdout. | |
tFloat64 | GetX () const |
gets the value of the x component More... | |
tVoid | SetX (tFloat64 xValue) |
Set the current x value to the given one. More... | |
tFloat64 | GetY () const |
gets the value of the y component More... | |
tVoid | SetY (tFloat64 f64YValue) |
Set the current y value to the given one. More... | |
tFloat64 | GetZ () const |
gets the value of the z component More... | |
tVoid | SetZ (tFloat64 zValue) |
Set the current z value to the given one. More... | |
cVector3 | operator= (const cVector3 &v) |
Set the current vector to the given one. More... | |
cVector3 | operator- (void) |
Negate the current vector. More... | |
operator IVector3 * () | |
instance of IVector3 More... | |
![]() | |
virtual | ~IVector3 () |
virtual destructor to ensure proper cleanup. | |
Static Public Attributes | |
static const cVector3 | Null |
Null vector. | |
static const cVector3 | One |
Identity vector. | |
Private Attributes | |
tFloat64 | x |
X coordinate of vector. | |
tFloat64 | y |
Y coordinate of vector. | |
tFloat64 | z |
Z coordinate of vector. | |
Static Private Attributes | |
static const tFloat64 | nullScalar |
scalar null value | |
static const tFloat64 | oneScalar |
scalar identity value | |
cVector3 | ( | const tFloat64 | f64X, |
const tFloat64 | f64Y, | ||
const tFloat64 | f64Z | ||
) |
Constructor.
f64X | [in] X coordinate of vector. |
f64Y | [in] Y coordinate of vector. |
f64Z | [in] Z coordinate of vector. |
OPT_INLINE void Add | ( | const cVector3 & | Vector | ) |
Add the given vector to the current one.
Vector | [in] Vector to add. |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Calculate the length of the current vector.
Implements IVector3.
Cross product of the current vector and the given one.
Vector | [in] Vector for multiplication. |
|
inlineexplicit |
|
inline |
Negate the current vector.
Definition at line 225 of file vector3.h.
References cVector3::cVector3(), cVector3::x, cVector3::y, and cVector3::z.
Set the current vector to the given one.
v | [in] Vector. |
Multiply every coordinate of the current vector with the corresponding coordinate from the given one.
Vector | [in] Vector for multiplication. |
OPT_INLINE void Scale | ( | const cVector3 & | Vector | ) |
Scale the current vector by the given one.
Vector | [in] Vector with scaling factors. |
OPT_INLINE void Scale | ( | const tFloat64 | Value | ) |
Scale the current vector by the given value.
Value | [in] Scaling factor. |
OPT_INLINE void Set | ( | const cVector3 & | Vector | ) |
Set vector to the given value.
Vector | [in] Value for vector. |
OPT_INLINE void Set | ( | const tFloat64 | f64X, |
const tFloat64 | f64Y, | ||
const tFloat64 | f64Z | ||
) |
Set vector to the given value.
f64X | [in] X value for vector. |
f64Y | [in] Y value for vector. |
f64Z | [in] Z value for vector. |
OPT_INLINE void Set | ( | const tFloat64 | Value | ) |
Set vector to the given value.
Value | [in] Value for vector. |
|
virtual |
Set the current x value to the given one.
xValue | [in] x value to set |
Implements IVector3.
|
virtual |
Set the current y value to the given one.
f64YValue | [in] y value to set |
Implements IVector3.
|
virtual |
Set the current z value to the given one.
zValue | [in] z value to set |
Implements IVector3.
OPT_INLINE void Sub | ( | const cVector3 & | Vector | ) |
Subtract the given vector from the current one.
Vector | [in] Vector to subtract. |