|
| | DtVectorT () |
| |
| | DtVectorT (const T &x, const T &y, const T &z) |
| | Construct from three doubles. More...
|
| |
| | ~DtVectorT () |
| | destructor More...
|
| |
| | DtVectorT (const DtVectorT< T > &vec) |
| | copy constructor More...
|
| |
| DtVectorT< T > & | operator= (const DtVectorT< T > &vec) |
| | assignment operator More...
|
| |
| void | setToZero () |
| | set Vector to all zeros More...
|
| |
| T & | operator[] (int ind) |
| | Get the value for the specified subscript. (int version) More...
|
| |
| T | operator[] (int ind) const |
| | A const version to get the value for the specified subscript. More...
|
| |
| T & | operator[] (DtVectorOffset ind) |
| | Get the value for the specified subscript. (enum version) More...
|
| |
| T | operator[] (DtVectorOffset ind) const |
| | a const version to get the value for the specified subscript. (enum version) More...
|
| |
| int | operator== (const DtVectorT< T > &vec) const |
| | Get whether another vector equals this vector. More...
|
| |
| int | operator!= (const DtVectorT< T > &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 (T &x, T &y, T &z) const |
| | get the x,y,z component of a Vector (faster than x(), y(), z() calls made separately) More...
|
| |
|
| void | setAll (const T &x, const T &y, const T &z) |
| | set x, y, and z components More...
|
| |
|
| const T & | x () const |
| | gets/sets the x component of a Vector More...
|
| |
| void | setX (const T &x) |
| | gets/sets the x component of a Vector More...
|
| |
|
| const T & | y () const |
| | gets/sets the y component of a Vector More...
|
| |
| void | setY (const T &y) |
| | gets/sets the y component of a Vector More...
|
| |
|
| const T & | z () const |
| | gets/sets the z component of a Vector More...
|
| |
| void | setZ (const T &z) |
| | gets/sets the z component of a Vector More...
|
| |
|
and should not be used.
They are provided for backwards compatibility
|
| | operator T * () |
| |
| | operator const T * () const |
| |
template<typename T>
class DtVectorT< T >
DtVectors represent vectors in 3-d space, X, Y, Z.
A DtVector is not a point. This class has no virtual functions, because we want the size of a DtVector to 3 * 8 (or 3*4 for DtVector32) bytes - so that you can make the same assumptions about it that we used to make about its size and layout. This is especially important in DtDcm, where we use an array of 3 DtVectors as the myRep. If DtVector had any virtual functions, there would be 4 bytes between vector reps.