VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.
void setFromGeocentricVector (const DtVector &geocVec, DtLocation3D &origin)
 This function sets the vector from a Geocentric vector.
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 ()
virtual std::string objectTypeC () const
 Returns a std::string version of the objectType.
virtual void init (void *userData)
 This function is called right after the object is constructed during the deserialization process, but before deserialize() is called.
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
DtVector3D getUnit (void) const
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.
bool operator== (const DtVector3D &) const
bool operator!= (const DtVector3D &orig) const

Additional Inherited Members

- Static Public Member Functions inherited from DtObjectDebugger< DtAsciiSerializable >
static DtObjectCounter::CounterType ObjectCount ()
static const DtObjectContainer * ObjectContainer ()
- Static Public Member Functions inherited from DtObjectDebugger< DtVector3D >
static DtObjectCounter::CounterType ObjectCount ()
static const DtObjectContainer * ObjectContainer ()
- Protected Member Functions inherited from DtObjectDebugger< DtAsciiSerializable >
 DtObjectDebugger ()
 DtObjectDebugger (const DtObjectDebugger &)
 ~DtObjectDebugger ()
- Protected Member Functions inherited from DtObjectDebugger< DtVector3D >
 DtObjectDebugger ()
 DtObjectDebugger (const DtObjectDebugger &)
 ~DtObjectDebugger ()

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)

Reimplemented in DtVector2D.

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.

Reimplemented in DtVector2D.

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
DtVector3D DtVector3D::getUnit ( void  ) const
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
bool DtVector3D::operator!= ( const DtVector3D orig) const
inline

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 Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)