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::DtVector3< T > Class Template Reference

2 dimensional vector More...

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

Public Member Functions

 DtVector3 ()
 CTOR. More...
 
 DtVector3 (T _x, T _y, T _z)
 CTOR. More...
 
template<class T1 >
 DtVector3 (const T1 &v)
 CTOR construct from type with constructable components. More...
 
 ~DtVector3 ()
 DTOR. More...
 
const void * ptr (void) const
 
const T * typePtr (void) const
 access the pointer to the data, with the type of the data More...
 
DtVector3 operator- (void) const
 Negate the vector. More...
 
bool operator== (const DtVector3 &rhs) const
 equality More...
 
bool operator!= (const DtVector3 &rhs) const
 inequality More...
 
bool isEqual (const DtVector3 &rhs, T tolerance=std::numeric_limits< T >::min()) const
 is rhs == to this vector within a specified tolerance/epsilon More...
 
DtVector3 operator+ (const DtVector3 &rhs) const
 component wise add two vectors together More...
 
DtVector3 operator- (const DtVector3 &rhs) const
 component wise subtract two vectors More...
 
DtVector3operator+= (const DtVector3 &rhs)
 component wise add rhs More...
 
DtVector3operator-= (const DtVector3 &rhs)
 component wise subtract rhs More...
 
DtVector3 operator+ (T fScalar) const
 add a scalar to each component More...
 
DtVector3 operator- (T fScalar) const
 subtract a scalar from each component More...
 
DtVector3 operator* (T fScalar) const
 multiply a scalar to each component More...
 
DtVector3 operator/ (T fScalar) const
 divide each component by a scalar More...
 
DtVector3operator+= (T fScalar)
 add a scalar to each component More...
 
DtVector3operator-= (T fScalar)
 subtract a scalar from each component More...
 
DtVector3operator*= (T fScalar)
 multiply a scalar to each component More...
 
DtVector3operator/= (T fScalar)
 divide each component by a scalar More...
 
bool operator> (const DtVector3 &rhs) const
 Return true if each component greater than the corresponding component of rhs. More...
 
bool operator< (const DtVector3 &rhs) const
 Return true if each component lessser than the corresponding component of rhs. More...
 
void normalize (void)
 normalize this vector in place More...
 
length (void) const
 get the length of this vector More...
 
squaredLength (void) const
 get the length squared of this vector More...
 
getDistance (const DtVector3 &rhs) const
 get the distance between this vector and rhs More...
 
DtVector3 crossProduct (const DtVector3 &rhs) const
 get the cross product of this vector and rhs More...
 
dotProduct (const DtVector3 &rhs) const
 get the dot product of this vector and rhs More...
 
absDotProduct (const DtVector3 &rhs) const
 get the abs dot product of this vector and rhs More...
 
DtVector3 midPoint (const DtVector3 &rhs) const
 get the midpoint between this vector and rhs More...
 
void makeCeil (const DtVector3 &rhs)
 Each component = max(component, rhs.component) More...
 
void makeFloor (const DtVector3 &rhs)
 Each component = min(component, rhs.component) More...
 
operator[] (size_t index) const
 access a component of this vector More...
 
T & operator[] (size_t index)
 access a component of this vector More...
 

Static Public Member Functions

static size_t sizeInBytes (void)
 

Public Attributes

x
 
y
 
z
 

Static Public Attributes

static const DtVector3 theZeroVector = DtVector3<T>(0, 0, 0)
 
static const DtVector3 theUnitScale = DtVector3<T>(1, 1, 1)
 
static const DtVector3 X_AXIS = DtVector3<T>(1, 0, 0)
 
static const DtVector3 Y_AXIS = DtVector3<T>(0, 1, 0)
 
static const DtVector3 Z_AXIS = DtVector3<T>(0, 0, 1)
 
static DtVector3 POSITIVE_INFINITY
 

Detailed Description

template<class T>
class makVrv::DtVector3< T >

2 dimensional vector

Constructor & Destructor Documentation

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

CTOR.

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

CTOR construct from type with constructable components.

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

DTOR.

Member Function Documentation

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

access the pointer to the data, with the type of the data

template<class T>
DtVector3 makVrv::DtVector3< T >::operator- ( void  ) const
inline

Negate the vector.

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

equality

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

inequality

template<class T>
bool makVrv::DtVector3< T >::isEqual ( const DtVector3< T > &  rhs,
tolerance = std::numeric_limits<T>::min() 
) const

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

References makVrv::DtMath::isEqual().

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

component wise add two vectors together

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

component wise subtract two vectors

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

component wise add rhs

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

component wise subtract rhs

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

add a scalar to each component

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

subtract a scalar from each component

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

multiply a scalar to each component

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

divide each component by a scalar

template<class T>
DtVector3< T > & makVrv::DtVector3< T >::operator+= ( fScalar)

add a scalar to each component

template<class T>
DtVector3< T > & makVrv::DtVector3< T >::operator-= ( fScalar)

subtract a scalar from each component

template<class T>
DtVector3< T > & makVrv::DtVector3< T >::operator*= ( fScalar)

multiply a scalar to each component

template<class T>
DtVector3< T > & makVrv::DtVector3< T >::operator/= ( fScalar)

divide each component by a scalar

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

Return true if each component greater than the corresponding component of rhs.

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

Return true if each component lessser than the corresponding component of rhs.

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

normalize this vector in place

References makVrv::DtMath::Sqrt().

Referenced by makVrv::DtMath::linePlaneIntersection().

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

get the length of this vector

References makVrv::DtMath::Sqrt().

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

get the length squared of this vector

template<class T >
T makVrv::DtVector3< T >::getDistance ( const DtVector3< T > &  rhs) const

get the distance between this vector and rhs

template<class T>
DtVector3< T > makVrv::DtVector3< T >::crossProduct ( const DtVector3< T > &  rhs) const

get the cross product of this vector and rhs

template<class T>
T makVrv::DtVector3< T >::dotProduct ( const DtVector3< T > &  rhs) const

get the dot product of this vector and rhs

Referenced by makVrv::DtMath::linePlaneIntersection().

template<class T>
T makVrv::DtVector3< T >::absDotProduct ( const DtVector3< T > &  rhs) const

get the abs dot product of this vector and rhs

References makVrv::DtMath::Abs().

template<class T >
DtVector3< T > makVrv::DtVector3< T >::midPoint ( const DtVector3< T > &  rhs) const

get the midpoint between this vector and rhs

template<class T>
void makVrv::DtVector3< T >::makeCeil ( const DtVector3< T > &  rhs)

Each component = max(component, rhs.component)

template<class T>
void makVrv::DtVector3< T >::makeFloor ( const DtVector3< T > &  rhs)

Each component = min(component, rhs.component)

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

access a component of this vector

References ASSERT_PREDICATE_RETURN_DEFAULT_CONSTRUCTOR.

template<class T >
T & makVrv::DtVector3< T >::operator[] ( size_t  index)

access a component of this vector

References ASSERT_PREDICATE.

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

Member Data Documentation

template<class T>
T makVrv::DtVector3< T >::x
template<class T>
T makVrv::DtVector3< T >::y
template<class T>
T makVrv::DtVector3< T >::z
template<class T>
const DtVector3< T > makVrv::DtVector3< T >::theZeroVector = DtVector3<T>(0, 0, 0)
static
template<class T>
const DtVector3< T > makVrv::DtVector3< T >::theUnitScale = DtVector3<T>(1, 1, 1)
static
template<class T>
const DtVector3< T > makVrv::DtVector3< T >::X_AXIS = DtVector3<T>(1, 0, 0)
static
template<class T>
const DtVector3< T > makVrv::DtVector3< T >::Y_AXIS = DtVector3<T>(0, 1, 0)
static
template<class T>
const DtVector3< T > makVrv::DtVector3< T >::Z_AXIS = DtVector3<T>(0, 0, 1)
static
template<class T>
DtVector3< T > makVrv::DtVector3< T >::POSITIVE_INFINITY
static
Initial value:
= DtVector3<T>(std::numeric_limits<T>::max()
, std::numeric_limits<T>::max()
, std::numeric_limits<T>::max())

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)