|
ADTF Display Toolbox
|
3D vector class. More...
#include <vector3.h>
Public Member Functions | |
| cVector3 () | |
| Constructor. | |
| cVector3 (const IVector3 *pVector3) | |
| constructor from IVector3 | |
| cVector3 (const tFloat64 f64X, const tFloat64 f64Y, const tFloat64 f64Z) | |
| Constructor. | |
| tVoid | Release () |
| Releases this vector. | |
| OPT_INLINE void | Set (const cVector3 &Vector) |
| Set vector to the given value. | |
| OPT_INLINE void | Set (const tFloat64 Value) |
| Set vector to the given value. | |
| OPT_INLINE void | Set (const tFloat64 f64X, const tFloat64 f64Y, const tFloat64 f64Z) |
| Set vector to the given value. | |
| OPT_INLINE void | Zero () |
| Set vector to zero. | |
| OPT_INLINE void | Add (const cVector3 &Vector) |
| Add the given vector to the current one. | |
| OPT_INLINE void | Sub (const cVector3 &Vector) |
| Subtract the given vector from the current one. | |
| OPT_INLINE void | Scale (const tFloat64 Value) |
| Scale the current vector by the given value. | |
| OPT_INLINE void | Scale (const cVector3 &Vector) |
| Scale the current vector by the given one. | |
| OPT_INLINE cVector3 | Scalar (const cVector3 &Vector) const |
| Multiply every coordinate of the current vector with the corresponding coordinate from the given one. | |
| OPT_INLINE cVector3 | Multiply (const cVector3 &Vector) const |
| Cross product of the current vector and the given one. | |
| tFloat | Length () const |
| Calculate the length of the current vector. | |
| 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 | |
| tVoid | SetX (tFloat64 f64XValue) |
| Set the current x value to the given one. | |
| tFloat64 | GetY () const |
| gets the value of the y component | |
| tVoid | SetY (tFloat64 f64YValue) |
| Set the current y value to the given one. | |
| tFloat64 | GetZ () const |
| gets the value of the z component | |
| tVoid | SetZ (tFloat64 f64ZValue) |
| Set the current z value to the given one. | |
| cVector3 | operator= (const cVector3 &v) |
| Set the current vector to the given one. | |
| cVector3 | operator- (void) |
| Negate the current vector. | |
| operator IVector3 * () | |
| instance of IVector3 | |
Public Member Functions inherited from IVector3 | |
| 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 | |
|
inline |
Constructor.
Definition at line 49 of file vector3.h.
References Zero().
Referenced by Add(), Multiply(), operator!=, operator*, operator*, operator*, operator+, operator+=, operator-, operator-(), operator-=, operator/, operator=(), operator==, Scalar(), Scale(), Set(), and Sub().
constructor from IVector3
| [in] | pVector3 | Vector3 |
Definition at line 59 of file vector3.h.
References IVector3::GetX(), IVector3::GetY(), IVector3::GetZ(), and Set().
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Cross product of the current vector and the given one.
| Vector | [in] Vector for multiplication. |
Definition at line 198 of file vector3.h.
References cVector3().
|
inline |
|
inlineexplicit |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
Set vector to the given value.
| Vector | [in] Value for vector. |
Definition at line 89 of file vector3.h.
References cVector3(), x, y, and z.
Referenced by cVector3(), cVector3(), and operator=().
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
private |
X coordinate of vector.
Definition at line 34 of file vector3.h.
Referenced by Add(), Dump(), GetX(), Length(), Normalize(), operator!=, operator*, operator*, operator*, operator+, operator+=, operator-, operator-(), operator-=, operator/, operator=(), operator==, Scalar(), Scale(), Scale(), Set(), Set(), Set(), SetX(), Sub(), and Zero().
|
private |
Y coordinate of vector.
Definition at line 35 of file vector3.h.
Referenced by Add(), Dump(), GetY(), Length(), Normalize(), operator!=, operator*, operator*, operator*, operator+, operator+=, operator-, operator-(), operator-=, operator/, operator=(), operator==, Scalar(), Scale(), Scale(), Set(), Set(), Set(), SetY(), Sub(), and Zero().
|
private |
Z coordinate of vector.
Definition at line 36 of file vector3.h.
Referenced by Add(), Dump(), GetZ(), Length(), Normalize(), operator!=, operator*, operator*, operator*, operator+, operator+=, operator-, operator-(), operator-=, operator/, operator=(), operator==, Scalar(), Scale(), Scale(), Set(), Set(), Set(), SetZ(), Sub(), and Zero().