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
DtVector3D Class Reference

DtVector3D is a vector in earth-relative coordinates, e.g. east-north or heading-range. Its direction in space depends on where on the earth it is attached (like topocentric coordinates).

Inheritance diagram for DtVector3D:
Inheritance graph
[legend]

Public Member Functions

 DtVector3D ()
 
 DtVector3D (const DtVector &vect)
 
 DtVector3D (const DtVector3D &vect)
 
 ~DtVector3D ()
 
DtVector3Doperator= (const DtVector3D &orig)
 
DtVector nedVector () const
 
 DtVector3D (const double north, const double east, const double down)
 
void setFromGeocentricVector (const DtVector &geocVec, DtLocation3D &origin)
 
DtVector3D makeCopy () const
 
void setNorthEastDown (const double north, const double east, const double down)
 
void setBearingInclRange (const double bearing, const double inclination, const double range)
 
double getBearing (void) const
 
double getInclination (void) const
 
double getRange (void) const
 
double getNorth (void) const
 
double getEast (void) const
 
double getDown (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)
 
DtString objectType () const
 
DtString serialize ()
 
bool deserialize (const DtString &data)
 
static DtAsciiSerializablecreator ()
 
DtVector myNEDVector
 
DtVector3D getScaled (const double scale) const
 
DtVector3D getNegated (void) const
 
DtVector3D getUnit (void) const
 
DtVector3D addVector3D (const DtVector3D &vec) const
 
DtVector3D crossVector3D (const DtVector3D &vec) const
 
double dotVector3D (const DtVector3D &vec) const
 
DtVector3D addOffset (const DtVectorOffset3D &offset) const
 
double headingDiff (const DtVector3D &vec) const
 
DtVectorGeoc3D makeVectorGeoc3DAtLoc (const DtLocation3D &loc) const
 
bool operator== (const DtVector3D &) const
 
bool operator!= (const DtVector3D &orig) const
 

Constructor & Destructor Documentation

DtVector3D::DtVector3D ( )

Constructor etc. intended for the script interface, not scripts themselves.

The constructor assumes that the vect holds north-east-down values.

DtVector3D::DtVector3D ( const DtVector vect)
DtVector3D::DtVector3D ( const DtVector3D vect)
DtVector3D::~DtVector3D ( )
DtVector3D::DtVector3D ( const double  north,
const double  east,
const double  down 
)

Constructor that is visible to scripts. Values in meters.

Member Function Documentation

DtVector3D& DtVector3D::operator= ( const DtVector3D orig)
DtVector DtVector3D::nedVector ( ) const
void DtVector3D::setFromGeocentricVector ( const DtVector geocVec,
DtLocation3D origin 
)

This function sets the vector from a Geocentric vector. It uses the location3D to get an origin and the orientation of the NED coordinate system at that origin.

DtVector3D DtVector3D::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 DtVector3D::objectType ( ) const
virtual

Inherited from DtAsciiSerializable.

Returns "DtVector3D"

Implements DtAsciiSerializable.

Reimplemented in DtVector2D.

DtString DtVector3D::serialize ( )
virtual

Returns a string serialized version of this class.

Implements DtAsciiSerializable.

bool DtVector3D::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* DtVector3D::creator ( )
static

Returns a new object of this type with default values.

void DtVector3D::setNorthEastDown ( const double  north,
const double  east,
const double  down 
)

Reset the vector from north, east, and down (in meters).

void DtVector3D::setBearingInclRange ( const double  bearing,
const double  inclination,
const double  range 
)

Reset the vector from bearing, inclination (both in radians), and range in meters. Bearing is compass angle, i.e. clockwise from north. Note that the absolute value of the passed range is used.

double DtVector3D::getBearing ( void  ) const

Set and get functions for different representations. Angles are in radians; all other parameters are in meters. All set functions set one dimension only, leaving the others unchanged.

double DtVector3D::getInclination ( void  ) const

void setBearing(const double bearing);

double DtVector3D::getRange ( void  ) const

void setInclination(const double inclination);

double DtVector3D::getNorth ( void  ) const

void setRange(const double range);

double DtVector3D::getEast ( void  ) const

void setNorth(double const north);

double DtVector3D::getDown ( void  ) const

void setEast(double const east);

DtVector3D DtVector3D::getScaled ( const double  scale) const

Vector modification functions. Return a new vector.

DtVector3D DtVector3D::getNegated ( void  ) const

Components are north-east-down.

DtVector3D DtVector3D::getUnit ( void  ) const

Components are north-east-down.

DtVector3D DtVector3D::addVector3D ( const DtVector3D vec) const

Adds another vector3D.

DtVector3D DtVector3D::crossVector3D ( const DtVector3D vec) const

Takes the cross product of given vector with this one.

double DtVector3D::dotVector3D ( const DtVector3D vec) const

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

DtVector3D DtVector3D::addOffset ( const DtVectorOffset3D offset) const

Adds an offset to this vector. The (right, forward, up) offset is transformed to the direction of this vector (assuming no roll) before being added.

double DtVector3D::headingDiff ( const DtVector3D vec) const

Determines the difference in headings from this vector to the given vector, in radians. Note that this is just in the horizontal plane.

DtVectorGeoc3D DtVector3D::makeVectorGeoc3DAtLoc ( const DtLocation3D loc) const

Makes a geocentric vector equivalent to this vector at the given location on the earth.

bool DtVector3D::operator== ( const DtVector3D ) const

Components are north-east-down.

bool DtVector3D::operator!= ( const DtVector3D orig) const
inline

Components are north-east-down.

Member Data Documentation

DtVector DtVector3D::myNEDVector
protected

Components are north-east-down.


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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)