![]() |
VR-Forces 4.10 Class Documentation
|
2 dimensional vector More...

Public Member Functions | |
| DtVector2 () | |
| CTOR. More... | |
| DtVector2 (T _x, T _y) | |
| CTOR. More... | |
| template<class T1 > | |
| DtVector2 (const T1 &v) | |
| CTOR construct from type with constructable components. More... | |
| ~DtVector2 () | |
| DTOR. More... | |
| const void * | ptr (void) const |
| get a pointer to the data More... | |
| T | operator[] (size_t index) const |
| access a component of the vector More... | |
| T | length (void) const |
| get the length of the vector More... | |
| T | squaredLength (void) const |
| get the length of the vector squared More... | |
| bool | isEqual (const DtVector2 &rhs, T tolerance) const |
| is rhs == to this vector within a specified tolerance/epsilon More... | |
| DtVector2 | operator+ (const DtVector2 &rhs) const |
| component wise add two vectors together More... | |
| DtVector2 | operator- (const DtVector2 &rhs) const |
| component wise subtract two vectors More... | |
| DtVector2 & | operator+= (const DtVector2 &rhs) |
| component wise add rhs More... | |
| DtVector2 & | operator-= (const DtVector2 &rhs) |
| component wise subtract rhs More... | |
| DtVector2 | operator+ (T fScalar) const |
| add a scalar to each component More... | |
| DtVector2 | operator- (T fScalar) const |
| subtract a scalar from each component More... | |
| DtVector2 | operator* (T fScalar) const |
| multiply a scalar to each component More... | |
| DtVector2 | operator/ (T fScalar) const |
| divide each component by a scalar More... | |
| DtVector2 | operator/ (const DtVector2 &rhs) const |
| component wise divide this scalar by rhs More... | |
| void | normalize (void) |
| normalize this vector in place More... | |
| DtVector2 | getNormalizedCopy (void) const |
| get a normalized copy of this vector More... | |
| T | getDotProduct (const DtVector2 &rhs) const |
| get the dot product of this vector with rhs More... | |
| bool | operator== (const DtVector2 &rhs) const |
| equality More... | |
| bool | operator!= (const DtVector2 &rhs) const |
| inequality More... | |
Static Public Member Functions | |
| static size_t | sizeInBytes (void) |
Public Attributes | |
| T | x |
| T | y |
Static Public Attributes | |
| static const DtVector2 | theZeroVector = DtVector2<T>(0,0) |
| static const DtVector2 | theUnitScale = DtVector2<T>(1,1) |
2 dimensional vector
|
inline |
CTOR.
|
inline |
CTOR.
CTOR construct from type with constructable components.
|
inline |
DTOR.
|
inline |
get a pointer to the data
| T makVrv::DtVector2< T >::operator[] | ( | size_t | index | ) | const |
access a component of the vector
References ASSERT_PREDICATE_RETURN_DEFAULT_CONSTRUCTOR.
| T makVrv::DtVector2< T >::length | ( | void | ) | const |
get the length of the vector
References makVrv::DtMath::Sqrt().
| T makVrv::DtVector2< T >::squaredLength | ( | void | ) | const |
get the length of the vector squared
| bool makVrv::DtVector2< T >::isEqual | ( | const DtVector2< T > & | rhs, |
| T | tolerance | ||
| ) | const |
is rhs == to this vector within a specified tolerance/epsilon
References makVrv::DtMath::isEqual().
| DtVector2 makVrv::DtVector2< T >::operator+ | ( | const DtVector2< T > & | rhs | ) | const |
component wise add two vectors together
| DtVector2 makVrv::DtVector2< T >::operator- | ( | const DtVector2< T > & | rhs | ) | const |
component wise subtract two vectors
| DtVector2< T > & makVrv::DtVector2< T >::operator+= | ( | const DtVector2< T > & | rhs | ) |
component wise add rhs
| DtVector2< T > & makVrv::DtVector2< T >::operator-= | ( | const DtVector2< T > & | rhs | ) |
component wise subtract rhs
| DtVector2< T > makVrv::DtVector2< T >::operator+ | ( | T | fScalar | ) | const |
add a scalar to each component
| DtVector2< T > makVrv::DtVector2< T >::operator- | ( | T | fScalar | ) | const |
subtract a scalar from each component
| DtVector2< T > makVrv::DtVector2< T >::operator* | ( | T | fScalar | ) | const |
multiply a scalar to each component
| DtVector2< T > makVrv::DtVector2< T >::operator/ | ( | T | fScalar | ) | const |
divide each component by a scalar
| DtVector2 makVrv::DtVector2< T >::operator/ | ( | const DtVector2< T > & | rhs | ) | const |
component wise divide this scalar by rhs
| void makVrv::DtVector2< T >::normalize | ( | void | ) |
normalize this vector in place
References makVrv::DtMath::Sqrt().
| DtVector2< T > makVrv::DtVector2< T >::getNormalizedCopy | ( | void | ) | const |
get a normalized copy of this vector
References makVrv::DtVector2< T >::theZeroVector.
| T makVrv::DtVector2< T >::getDotProduct | ( | const DtVector2< T > & | rhs | ) | const |
get the dot product of this vector with rhs
| bool makVrv::DtVector2< T >::operator== | ( | const DtVector2< T > & | rhs | ) | const |
equality
| bool makVrv::DtVector2< T >::operator!= | ( | const DtVector2< T > & | rhs | ) | const |
inequality
|
static |
| T makVrv::DtVector2< T >::x |
| T makVrv::DtVector2< T >::y |
|
static |
Referenced by makVrv::DtVector2< T >::getNormalizedCopy().
|
static |