"L. Spiro Engine"
|
A template for any type of 4D vector. More...
#include <LSMVector4Base.h>
Public Member Functions | |
LSE_CALLCTOR | CVector4Base (_tType _fX, _tType _fY, _tType _fZ, _tType _fW) |
LSE_CALLCTOR | CVector4Base (_tType *_pfValues) |
_tType LSE_FCALL | operator[] (LSUINT32 _ui32Index) const |
_tType &LSE_FCALL | operator[] (LSUINT32 _ui32Index) |
CVector4Base< _tType, _tVec3 > LSE_FCALL | operator- () const |
CVector4Base< _tType, _tVec3 > LSE_FCALL | operator+ (const CVector4Base< _tType, _tVec3 > &_v4bOther) const |
CVector4Base< _tType, _tVec3 > LSE_FCALL | operator- (const CVector4Base< _tType, _tVec3 > &_v4bOther) const |
CVector4Base< _tType, _tVec3 > LSE_FCALL | operator* (_tType _tValue) const |
CVector4Base< _tType, _tVec3 > LSE_FCALL | operator/ (_tType _tValue) const |
CVector4Base< _tType, _tVec3 > &LSE_FCALL | operator+= (const CVector4Base< _tType, _tVec3 > &_v4bOther) |
CVector4Base< _tType, _tVec3 > &LSE_FCALL | operator-= (const CVector4Base< _tType, _tVec3 > &_v4bOther) |
CVector4Base< _tType, _tVec3 > &LSE_FCALL | operator*= (_tType _tValue) |
CVector4Base< _tType, _tVec3 > &LSE_FCALL | operator/= (_tType _tValue) |
_tType LSE_FCALL | operator* (const CVector4Base< _tType, _tVec3 > &_v4bOther) const |
LSBOOL LSE_FCALL | operator== (const CVector4Base< _tType, _tVec3 > &_v4bOther) const |
LSBOOL LSE_FCALL | operator!= (const CVector4Base< _tType, _tVec3 > &_v4bOther) const |
LSVOID LSE_FCALL | Set (_tType _fX, _tType _fY, _tType _fZ, _tType _fW) |
LSVOID LSE_FCALL | Clear () |
LSVOID LSE_FCALL | Invert () |
_tType LSE_FCALL | Len () const |
_tType LSE_FCALL | LenSq () const |
LSVOID LSE_FCALL | Normalize () |
_tType LSE_FCALL | Dot (const CVector4Base< _tType, _tVec3 > &_v4bOther) const |
_tVec3 LSE_FCALL | Vec3 () const |
Static Public Member Functions | |
static _tType LSE_FCALL | DotProduct (const CVector4Base< _tType, _tVec3 > &_v4bLeft, const CVector4Base< _tType, _tVec3 > &_v4bRight) |
static CVector4Base< _tType, _tVec3 > LSE_FCALL | Lerp (const CVector4Base< _tType, _tVec3 > &_v4bLeft, const CVector4Base< _tType, _tVec3 > &_v4bRight, _tType _fFrac) |
static CVector4Base< _tType, _tVec3 > LSE_FCALL | Hermite (const CVector4Base< _tType, _tVec3 > &_v4bLeft, const CVector4Base< _tType, _tVec3 > &_v4bT0, const CVector4Base< _tType, _tVec3 > &_v4bRight, const CVector4Base< _tType, _tVec3 > &_v4bT1, _tType _fFrac) |
static CVector4Base< _tType, _tVec3 > LSE_FCALL | CatmullRom (const CVector4Base< _tType, _tVec3 > &_v4bV0, const CVector4Base< _tType, _tVec3 > &_v4bV1, const CVector4Base< _tType, _tVec3 > &_v4bV2, const CVector4Base< _tType, _tVec3 > &_v4bV3, _tType _fFrac) |
Public Attributes | |
_tType | x |
_tType | y |
_tType | z |
_tType | w |
A template for any type of 4D vector.
Class CVector4Base Description: A template for any type of 4D vector.
static CVector4Base<_tType, _tVec3> LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::CatmullRom | ( | const CVector4Base< _tType, _tVec3 > & | _v4bV0, |
const CVector4Base< _tType, _tVec3 > & | _v4bV1, | ||
const CVector4Base< _tType, _tVec3 > & | _v4bV2, | ||
const CVector4Base< _tType, _tVec3 > & | _v4bV3, | ||
_tType | _fFrac | ||
) | [inline, static] |
Perform a Catmull-Rom spline interpolation between the supplied vectors
_v4bV0 | Input point 0. |
_v4bV1 | Input point 1. |
_v4bV2 | Input point 2. |
_v4bV3 | Input point 3. |
_fFrac | Amount by which to interpolate between _v4bV1 and _v4bV2. |
LSVOID LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::Clear | ( | ) | [inline] |
Sets all axes on this vector to 0.
_tType LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::Dot | ( | const CVector4Base< _tType, _tVec3 > & | _v4bOther | ) | const [inline] |
Performs a dot-product operation. The dot product of two normalized vectors is the cosine of the angle between them.
_v4bOther | The vector against which the dot product is to be determined. |
static _tType LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::DotProduct | ( | const CVector4Base< _tType, _tVec3 > & | _v4bLeft, |
const CVector4Base< _tType, _tVec3 > & | _v4bRight | ||
) | [inline, static] |
Performs a dot-product operation. The dot product of two normalized vectors is the cosine of the angle between them.
_v4bLeft | The left operand. |
_v4bRight | The right operand. |
static CVector4Base<_tType, _tVec3> LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::Hermite | ( | const CVector4Base< _tType, _tVec3 > & | _v4bLeft, |
const CVector4Base< _tType, _tVec3 > & | _v4bT0, | ||
const CVector4Base< _tType, _tVec3 > & | _v4bRight, | ||
const CVector4Base< _tType, _tVec3 > & | _v4bT1, | ||
_tType | _fFrac | ||
) | [inline, static] |
Perform a Hermite spline interpolation between the supplied vectors.
_v4bLeft | Left operand. |
_v4bT0 | Left tangent. |
_v4bRight | Right operand. |
_v4bT1 | Right tangent. |
_fFrac | Amount by which to interpolate between the vectors. |
LSVOID LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::Invert | ( | ) | [inline] |
Negates each axis on this vector.
_tType LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::Len | ( | ) | const [inline] |
Calculates the length of the vector.
_tType LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::LenSq | ( | ) | const [inline] |
Calculates the squared length of the vector.
static CVector4Base<_tType, _tVec3> LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::Lerp | ( | const CVector4Base< _tType, _tVec3 > & | _v4bLeft, |
const CVector4Base< _tType, _tVec3 > & | _v4bRight, | ||
_tType | _fFrac | ||
) | [inline, static] |
Linearly interpolate between two vectors, returning the resulting vector.
_v4bLeft | Left operand. |
_v4bRight | Right operand. |
_fFrac | Amount by which to interpolate between the vectors. |
LSVOID LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::Normalize | ( | ) | [inline] |
Normalizes this vector. Normalization is the process of adjusting the length of the vector so that it is unit length (1 unit in length) while maintaining its direction. Accuracy/speed depends on the LSM_PERFORMANCE macro.
LSBOOL LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator!= | ( | const CVector4Base< _tType, _tVec3 > & | _v4bOther | ) | const [inline] |
Inequality.
_v4bOther | The vector to check for inequality. |
CVector4Base<_tType, _tVec3> LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator* | ( | _tType | _tValue | ) | const [inline] |
Binary multiplication.
_tValue | The amount by which to multiply each component in this vector. |
_tType LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator* | ( | const CVector4Base< _tType, _tVec3 > & | _v4bOther | ) | const [inline] |
Performs a dot-product operation. The dot product of two normalized vectors is the cosine of the angle between them.
_v4bOther | The vector against which the dot product is to be determined. |
CVector4Base<_tType, _tVec3>& LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator*= | ( | _tType | _tValue | ) | [inline] |
Multiply the vector by a given amount, storing the result in this vector.
_tValue | The amount by which to multiply each component in this vector. |
CVector4Base<_tType, _tVec3> LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator+ | ( | const CVector4Base< _tType, _tVec3 > & | _v4bOther | ) | const [inline] |
Binary addition.
_v4bOther | The vector to add to this one componentwise. |
CVector4Base<_tType, _tVec3>& LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator+= | ( | const CVector4Base< _tType, _tVec3 > & | _v4bOther | ) | [inline] |
Add a vector to this vector, storing the result in this vector.
_v4bOther | The vector to add to this vector. |
CVector4Base<_tType, _tVec3> LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator- | ( | ) | const [inline] |
Unary -.
CVector4Base<_tType, _tVec3> LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator- | ( | const CVector4Base< _tType, _tVec3 > & | _v4bOther | ) | const [inline] |
Binary subtraction.
_v4bOther | The vector to subtract from this one componentwise. |
CVector4Base<_tType, _tVec3>& LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator-= | ( | const CVector4Base< _tType, _tVec3 > & | _v4bOther | ) | [inline] |
Subtract a vector from this vector, storing the result in this vector.
_v4bOther | The vector to subtract from this vector. |
CVector4Base<_tType, _tVec3> LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator/ | ( | _tType | _tValue | ) | const [inline] |
Binary division.
_tValue | The amount by which to divide each component in this vector. |
CVector4Base<_tType, _tVec3>& LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator/= | ( | _tType | _tValue | ) | [inline] |
Divide the vector by a given amount, storing the result in this vector.
_tValue | The amount by which to divide each component in this vector. |
LSBOOL LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator== | ( | const CVector4Base< _tType, _tVec3 > & | _v4bOther | ) | const [inline] |
Equality.
_v4bOther | The vector to check for equality. |
_tType LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator[] | ( | LSUINT32 | _ui32Index | ) | const [inline] |
Array access.
_ui32Index | Index of the dimension to get. |
_tType& LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::operator[] | ( | LSUINT32 | _ui32Index | ) | [inline] |
Array access.
_ui32Index | Index of the dimension to get. |
LSVOID LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::Set | ( | _tType | _fX, |
_tType | _fY, | ||
_tType | _fZ, | ||
_tType | _fW | ||
) | [inline] |
Apply the given values to each of the axes on this vector.
_fX | The new X-axis value. |
_fY | The new Y-axis value. |
_fZ | The new Z-axis value. |
_fW | The new W-axis value. |
_tVec3 LSE_FCALL lsm::CVector4Base< _tType, _tVec3 >::Vec3 | ( | ) | const [inline] |
Get the X, Y, and Z values of this vector as a 3D vector.
_tType lsm::CVector4Base< _tType, _tVec3 >::w |
The W value.
_tType lsm::CVector4Base< _tType, _tVec3 >::x |
The X value.
_tType lsm::CVector4Base< _tType, _tVec3 >::y |
The Y value.
_tType lsm::CVector4Base< _tType, _tVec3 >::z |
The Z value.