VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
makVrv::DtVector2< T > Class Template Reference

2 dimensional vector More...

Inheritance diagram for makVrv::DtVector2< T >:
Inheritance graph
[legend]

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...
 
operator[] (size_t index) const
 access a component of the vector More...
 
length (void) const
 get the length of the vector More...
 
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...
 
DtVector2operator+= (const DtVector2 &rhs)
 component wise add rhs More...
 
DtVector2operator-= (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...
 
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

x
 
y
 

Static Public Attributes

static const DtVector2 theZeroVector = DtVector2<T>(0,0)
 
static const DtVector2 theUnitScale = DtVector2<T>(1,1)
 

Detailed Description

template<class T>
class makVrv::DtVector2< T >

2 dimensional vector

Constructor & Destructor Documentation

template<class T>
makVrv::DtVector2< T >::DtVector2 ( )
inline

CTOR.

template<class T>
makVrv::DtVector2< T >::DtVector2 ( _x,
_y 
)
inline

CTOR.

template<class T>
template<class T1 >
makVrv::DtVector2< T >::DtVector2 ( const T1 &  v)
inline

CTOR construct from type with constructable components.

template<class T>
makVrv::DtVector2< T >::~DtVector2 ( )
inline

DTOR.

Member Function Documentation

template<class T>
const void* makVrv::DtVector2< T >::ptr ( void  ) const
inline

get a pointer to the data

template<class T >
T makVrv::DtVector2< T >::operator[] ( size_t  index) const

access a component of the vector

References ASSERT_PREDICATE_RETURN_DEFAULT_CONSTRUCTOR.

template<class T >
T makVrv::DtVector2< T >::length ( void  ) const

get the length of the vector

References makVrv::DtMath::Sqrt().

template<class T >
T makVrv::DtVector2< T >::squaredLength ( void  ) const

get the length of the vector squared

template<class T>
bool makVrv::DtVector2< T >::isEqual ( const DtVector2< T > &  rhs,
tolerance 
) const

is rhs == to this vector within a specified tolerance/epsilon

References makVrv::DtMath::isEqual().

template<class T>
DtVector2 makVrv::DtVector2< T >::operator+ ( const DtVector2< T > &  rhs) const

component wise add two vectors together

template<class T>
DtVector2 makVrv::DtVector2< T >::operator- ( const DtVector2< T > &  rhs) const

component wise subtract two vectors

template<class T>
DtVector2< T > & makVrv::DtVector2< T >::operator+= ( const DtVector2< T > &  rhs)

component wise add rhs

template<class T>
DtVector2< T > & makVrv::DtVector2< T >::operator-= ( const DtVector2< T > &  rhs)

component wise subtract rhs

template<class T>
DtVector2< T > makVrv::DtVector2< T >::operator+ ( fScalar) const

add a scalar to each component

template<class T>
DtVector2< T > makVrv::DtVector2< T >::operator- ( fScalar) const

subtract a scalar from each component

template<class T>
DtVector2< T > makVrv::DtVector2< T >::operator* ( fScalar) const

multiply a scalar to each component

template<class T>
DtVector2< T > makVrv::DtVector2< T >::operator/ ( fScalar) const

divide each component by a scalar

template<class T>
DtVector2 makVrv::DtVector2< T >::operator/ ( const DtVector2< T > &  rhs) const

component wise divide this scalar by rhs

template<class T >
void makVrv::DtVector2< T >::normalize ( void  )

normalize this vector in place

References makVrv::DtMath::Sqrt().

template<class T >
DtVector2< T > makVrv::DtVector2< T >::getNormalizedCopy ( void  ) const

get a normalized copy of this vector

References makVrv::DtVector2< T >::theZeroVector.

template<class T>
T makVrv::DtVector2< T >::getDotProduct ( const DtVector2< T > &  rhs) const

get the dot product of this vector with rhs

template<class T>
bool makVrv::DtVector2< T >::operator== ( const DtVector2< T > &  rhs) const

equality

template<class T>
bool makVrv::DtVector2< T >::operator!= ( const DtVector2< T > &  rhs) const

inequality

template<class T >
size_t makVrv::DtVector2< T >::sizeInBytes ( void  )
static

Member Data Documentation

template<class T>
T makVrv::DtVector2< T >::x
template<class T>
T makVrv::DtVector2< T >::y
template<class T>
const DtVector2< T > makVrv::DtVector2< T >::theZeroVector = DtVector2<T>(0,0)
static
template<class T>
const DtVector2< T > makVrv::DtVector2< T >::theUnitScale = DtVector2<T>(1,1)
static

The documentation for this class was generated from the following files:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)