VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions
DtVector32 Class Reference
+ Inheritance diagram for DtVector32:
+ Collaboration diagram for DtVector32:

Public Member Functions

 DtVector32 ()
 
 DtVector32 (const float &x, const float &y, const float &z)
 Construct from three doubles. More...
 
 ~DtVector32 ()
 destructor More...
 
 DtVector32 (const DtVector32 &vec)
 copy constructor More...
 
 DtVector32 (const DtVectorT< float > &vec)
 
DtVector32operator= (const DtVector32 &vec)
 assignment operator More...
 
DtVector32operator= (const DtVectorT< float > &vec)
 
DtVector32 crossProduct (const DtVector32 &v) const
 Compute cross product with another vector. More...
 
DtVector32operator+= (const DtVector32 &other)
 adds other to this vector More...
 
DtVector32operator-= (const DtVector32 &other)
 subtracts other from this vector (this - other) More...
 
float dotProduct (const DtVector32 &v) const
 Compute dot product with another vector. More...
 
bool approxEq (const DtVector32 &v, const double &tolerance) const
 check if the vector is zero-ed out withing the tolerance passed More...
 
- Public Member Functions inherited from DtVectorT< float >
 DtVectorT ()
 
 DtVectorT (const float &x, const float &y, const float &z)
 Construct from three doubles. More...
 
 DtVectorT (const DtVectorT< float > &vec)
 copy constructor More...
 
 ~DtVectorT ()
 destructor More...
 
DtVectorT< float > & operator= (const DtVectorT< float > &vec)
 assignment operator More...
 
void setToZero ()
 set Vector to all zeros More...
 
floatoperator[] (int ind)
 Get the value for the specified subscript. (int version) More...
 
float operator[] (int ind) const
 A const version to get the value for the specified subscript. More...
 
floatoperator[] (DtVectorOffset ind)
 Get the value for the specified subscript. (enum version) More...
 
float operator[] (DtVectorOffset ind) const
 a const version to get the value for the specified subscript. (enum version) More...
 
int operator== (const DtVectorT< float > &vec) const
 Get whether another vector equals this vector. More...
 
int operator!= (const DtVectorT< float > &vec) const
 Get whether another vector does not equal this vector. More...
 
DtString string () const
 Get a string representation of the vector. More...
 
double magnitudeSquared () const
 Get the magnitude of the vector squared, i.e. More...
 
void normalize ()
 Normalize the vector; i.e., magnitude = 1. More...
 
bool isNormalized () const
 Returns true of the vector is Normalized. More...
 
bool magnitudeIsZero () const
 check if the magnitude of this vector is zero More...
 
bool magnitudeIsZero (double tolerance) const
 check if the magnitude of this vector is zero, within the tolerance passed. More...
 
std::ostream & printDataToStream (std::ostream &str) const
 prints out a formated string to the stream More...
 
void get (float &x, float &y, float &z) const
 get the x,y,z component of a Vector (faster than x(), y(), z() calls made separately) More...
 
void setAll (const float &x, const float &y, const float &z)
 set x, y, and z components More...
 
const floatx () const
 gets/sets the x component of a Vector More...
 
void setX (const float &x)
 gets/sets the x component of a Vector More...
 
const floaty () const
 gets/sets the y component of a Vector More...
 
void setY (const float &y)
 gets/sets the y component of a Vector More...
 
const floatz () const
 gets/sets the z component of a Vector More...
 
void setZ (const float &z)
 gets/sets the z component of a Vector More...
 
 operator float * ()
 
 operator const float * () const
 

Static Public Member Functions

static const DtVector32zero ()
 Get a zeroed vector. More...
 
static const DtVector32i ()
 Get a (1,0,0) vector. More...
 
static const DtVector32j ()
 Get a (0,1,0) vector. More...
 
static const DtVector32k ()
 Get a (0,0,1) vector. More...
 
static const DtVector32ones ()
 Get a vector set to all ones. More...
 

Additional Inherited Members

- Protected Attributes inherited from DtVectorT< float >
float myRep [3]
 

Constructor & Destructor Documentation

DtVector32::DtVector32 ( )
inline
DtVector32::DtVector32 ( const float x,
const float y,
const float z 
)
inline

Construct from three doubles.

DtVector32::~DtVector32 ( )
inline

destructor

DtVector32::DtVector32 ( const DtVector32 vec)
inline

copy constructor

DtVector32::DtVector32 ( const DtVectorT< float > &  vec)
inline

Member Function Documentation

bool DtVector32::approxEq ( const DtVector32 v,
const double tolerance 
) const

check if the vector is zero-ed out withing the tolerance passed

DtVector32 DtVector32::crossProduct ( const DtVector32 v) const
inline

Compute cross product with another vector.

float DtVector32::dotProduct ( const DtVector32 v) const

Compute dot product with another vector.

static const DtVector32& DtVector32::i ( )
static

Get a (1,0,0) vector.

static const DtVector32& DtVector32::j ( )
static

Get a (0,1,0) vector.

static const DtVector32& DtVector32::k ( )
static

Get a (0,0,1) vector.

static const DtVector32& DtVector32::ones ( )
static

Get a vector set to all ones.

DtVector32& DtVector32::operator+= ( const DtVector32 other)

adds other to this vector

DtVector32& DtVector32::operator-= ( const DtVector32 other)

subtracts other from this vector (this - other)

DtVector32& DtVector32::operator= ( const DtVector32 vec)
inline

assignment operator

DtVector32& DtVector32::operator= ( const DtVectorT< float > &  vec)
inline
static const DtVector32& DtVector32::zero ( )
static

Get a zeroed vector.


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

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)