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 | Protected Attributes
DtVectorOffset3D Class Reference

VectorOffset3D is a direction vector that is relative to some direction specified by a Vector3D. E.g. this may be a "body" vector that is situated on an entity oriented in the world. A vectorOffset3D can be used to generate a direction in the world by transforming it to the direction of a vector3D or adding it to a vector3D.

Inheritance diagram for DtVectorOffset3D:
Inheritance graph
[legend]

Public Member Functions

 DtVectorOffset3D ()
 
 DtVectorOffset3D (const DtVector &vect)
 
 DtVectorOffset3D (const DtVectorOffset3D &orig)
 
 ~DtVectorOffset3D ()
 
DtVectorOffset3Doperator= (const DtVectorOffset3D &orig)
 
 DtVectorOffset3D (double right, double forward, double up)
 
void setFromBodyVector (const DtVector &vect)
 
DtVectorOffset3D makeCopy () const
 
DtVectorOffset3D addOffset (const DtVectorOffset3D offset) const
 
DtVectorOffset3D crossVectorOffset3D (const DtVectorOffset3D &vec) const
 
double dotVectorOffset3D (const DtVectorOffset3D &vec) const
 
DtVector3D makeVectorRefToDirection (const DtVector3D dirVect) const
 
DtVector vector () const
 
bool operator== (const DtVectorOffset3D &) const
 
bool operator!= (const DtVectorOffset3D &orig) const
 
double getRight (void) const
 
void setRight (const double right)
 
double getForward (void) const
 
void setForward (const double forward)
 
double getUp (void) const
 
void setUp (const double up)
 
DtVectorOffset3D getScaled (const double scale) const
 
DtVectorOffset3D getNegated (void) const
 
DtVectorOffset3D getUnit (void) const
 
- Public Member Functions inherited from DtAsciiSerializable
 DtAsciiSerializable ()
 
 DtAsciiSerializable (const DtAsciiSerializable &orig)
 
virtual ~DtAsciiSerializable ()
 
virtual std::string objectTypeC () const
 
virtual void init (void *userData)
 

Protected Attributes

DtVector myVector
 
DtString objectType () const
 
DtString serialize ()
 
bool deserialize (const DtString &data)
 
static DtAsciiSerializablecreator ()
 

Constructor & Destructor Documentation

DtVectorOffset3D::DtVectorOffset3D ( )
DtVectorOffset3D::DtVectorOffset3D ( const DtVector vect)

This constructor assumes the vector has components in the order right, forward, up.

DtVectorOffset3D::DtVectorOffset3D ( const DtVectorOffset3D orig)
DtVectorOffset3D::~DtVectorOffset3D ( )
DtVectorOffset3D::DtVectorOffset3D ( double  right,
double  forward,
double  up 
)

Constructor visible to the script.

Member Function Documentation

DtVectorOffset3D& DtVectorOffset3D::operator= ( const DtVectorOffset3D orig)
void DtVectorOffset3D::setFromBodyVector ( const DtVector vect)

Set the component values from a DIS body vector; the vector components here should be forward-right-down.

DtVectorOffset3D DtVectorOffset3D::makeCopy ( ) const

The assignment operator and copy constructor above, are useful in the expected way for C++ code, but Lua just copies the references to objects, so a special copy function is needed.

DtString DtVectorOffset3D::objectType ( ) const
virtual

Inherited from DtAsciiSerializable.

Returns "DtVectorOffset3D"

Implements DtAsciiSerializable.

DtString DtVectorOffset3D::serialize ( )
virtual

Returns a string serialized version of this class.

Implements DtAsciiSerializable.

bool DtVectorOffset3D::deserialize ( const DtString data)
virtual

Returns true if it could fill its members with the data contained in the string. False otherwise.

Implements DtAsciiSerializable.

static DtAsciiSerializable* DtVectorOffset3D::creator ( )
static

Returns a new object of this type with default values.

double DtVectorOffset3D::getRight ( void  ) const

Get and set functions for components.

void DtVectorOffset3D::setRight ( const double  right)

Get and set functions for components.

double DtVectorOffset3D::getForward ( void  ) const

Get and set functions for components.

void DtVectorOffset3D::setForward ( const double  forward)

Get and set functions for components.

double DtVectorOffset3D::getUp ( void  ) const

Get and set functions for components.

void DtVectorOffset3D::setUp ( const double  up)

Get and set functions for components.

DtVectorOffset3D DtVectorOffset3D::getScaled ( const double  scale) const

Vector modification functions. Return a new vector.

DtVectorOffset3D DtVectorOffset3D::getNegated ( void  ) const

Vector modification functions. Return a new vector.

DtVectorOffset3D DtVectorOffset3D::getUnit ( void  ) const

Vector modification functions. Return a new vector.

DtVectorOffset3D DtVectorOffset3D::addOffset ( const DtVectorOffset3D  offset) const

Add another offset vector.

DtVectorOffset3D DtVectorOffset3D::crossVectorOffset3D ( const DtVectorOffset3D vec) const

Takes the cross product of given vector with this one.

double DtVectorOffset3D::dotVectorOffset3D ( const DtVectorOffset3D vec) const

Takes the dot product of the given vector with this one.

DtVector3D DtVectorOffset3D::makeVectorRefToDirection ( const DtVector3D  dirVect) const

Make this offset into an earth-referenced vector by transforming it to the direction of the provided vector. "Direction" assumes no roll.

DtVector DtVectorOffset3D::vector ( ) const
bool DtVectorOffset3D::operator== ( const DtVectorOffset3D ) const
bool DtVectorOffset3D::operator!= ( const DtVectorOffset3D orig) const
inline

Member Data Documentation

DtVector DtVectorOffset3D::myVector
protected

Stores components right, forward, and up.


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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)