VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions
DtVector3D Class Reference

DtVector3D is a vector in earth-relative coordinates, e.g. More...

Inheritance diagram for DtVector3D:
Inheritance graph
[legend]

Public Member Functions

 DtVector3D ()
 Constructor etc.
 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)
 Constructor that is visible to scripts. Values in meters.
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.
void setNorthEastDown (const double north, const double east, const double down)
 Reset the vector from north, east, and down (in meters).
void setBearingInclRange (const double bearing, const double inclination, const double range)
 Reset the vector from bearing, inclination (both in radians), and range in meters.
double getBearing (void) const
 Set and get functions for different representations.
double getInclination (void) const
 void setBearing(const double bearing);
double getRange (void) const
 void setInclination(const double inclination);
double getNorth (void) const
 void setRange(const double range);
double getEast (void) const
 void setNorth(double const north);
double getDown (void) const
 void setEast(double const east);
- Public Member Functions inherited from DtAsciiSerializable
 DtAsciiSerializable ()
 The implementer of this interface should be sure to create a creator function to create an empty object that returns a pointer to this interface.
 DtAsciiSerializable (const DtAsciiSerializable &orig)
virtual ~DtAsciiSerializable ()
DtString objectType () const
 Inherited from DtAsciiSerializable.
DtString serialize ()
 Returns a string serialized version of this class.
bool deserialize (const DtString &data)
 Returns true if it could fill its members with the data contained in the string.
static DtAsciiSerializablecreator ()
 Returns a new object of this type with default values.
DtVector myNEDVector
 Components are north-east-down.
DtVector3D getScaled (const double scale) const
 void setDown(double const down);
DtVector3D getNegated (void) const
 Components are north-east-down.
DtVector3D getUnit (void) const
 Components are north-east-down.
DtVector3D addVector3D (const DtVector3D &vec) const
 Adds another vector3D.
DtVector3D crossVector3D (const DtVector3D &vec) const
 Takes the cross product of given vector with this one.
double dotVector3D (const DtVector3D &vec) const
 Takes the dot product of the given vector with this one.
DtVector3D addOffset (const DtVectorOffset3D &offset) const
 Adds an offset to this vector.
double headingDiff (const DtVector3D &vec) const
 Determines the difference in headings from this vector to the given vector, in radians.
DtVectorGeoc3D makeVectorGeoc3DAtLoc (const DtLocation3D &loc) const
 Makes a geocentric vector equivalent to this vector at the given location on the earth.

Detailed Description

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).

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
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.

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

void setDown(double const down);

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.

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 Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)