VR-Forces Developer's Guide
 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

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

2 dimensional vector

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

Public Member Functions

 DtVector3 ()
 
 DtVector3 (T _x, T _y, T _z)
 
template<class T1 >
 DtVector3 (const T1 &v)
 
 ~DtVector3 ()
 
const void * ptr (void) const
 
const T * typePtr (void) const
 
DtVector3 operator- (void) const
 
bool operator== (const DtVector3 &rhs) const
 
bool operator!= (const DtVector3 &rhs) const
 
bool isEqual (const DtVector3 &rhs, T tolerance=std::numeric_limits< T >::min()) const
 
DtVector3 operator+ (const DtVector3 &rhs) const
 
DtVector3 operator- (const DtVector3 &rhs) const
 
DtVector3operator+= (const DtVector3 &rhs)
 
DtVector3operator-= (const DtVector3 &rhs)
 
DtVector3 operator+ (T fScalar) const
 
DtVector3 operator- (T fScalar) const
 
DtVector3 operator* (T fScalar) const
 
DtVector3 operator/ (T fScalar) const
 
DtVector3operator+= (T fScalar)
 
DtVector3operator-= (T fScalar)
 
DtVector3operator*= (T fScalar)
 
DtVector3operator/= (T fScalar)
 
bool operator> (const DtVector3 &rhs) const
 
bool operator< (const DtVector3 &rhs) const
 
void normalize (void)
 
length (void) const
 
squaredLength (void) const
 
getDistance (const DtVector3 &rhs) const
 
DtVector3 crossProduct (const DtVector3 &rhs) const
 
dotProduct (const DtVector3 &rhs) const
 
absDotProduct (const DtVector3 &rhs) const
 
DtVector3 midPoint (const DtVector3 &rhs) const
 
void makeCeil (const DtVector3 &rhs)
 
void makeFloor (const DtVector3 &rhs)
 
operator[] (size_t index) const
 
T & operator[] (size_t index)
 
void set (T x, T y, T z)
 

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
 

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.

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

access a component of this vector

References ASSERT_PREDICATE.

template<class T>
void makVrv::DtVector3< T >::set ( x,
y,
z 
)

set values

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 Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)