VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions
DtVector2D Class Reference

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

Inheritance diagram for DtVector2D:
Inheritance graph
[legend]

Public Member Functions

 DtVector2D ()
 Constructor etc. More...
 
 DtVector2D (const DtVector &vect)
 
 DtVector2D (const DtVector3D &vect)
 
 ~DtVector2D ()
 
DtVector2Doperator= (const DtVector3D &orig)
 
 DtVector2D (const double north, const double east)
 Constructor that is visible to scripts. Values in meters. More...
 
DtString objectType () const
 Returns "DtVector2D". More...
 
void setNorth (const double north)
 
void setEast (const double east)
 
DtVector2D addVector2D (const DtVector3D &vec)
 This fn zeros out the down component. More...
 
double crossVector2D (const DtVector3D &vec)
 The cross product returns a scalar instead of a vector. More...
 
double dotVector2D (const DtVector3D &vec)
 Returns dot prod of north & east components. More...
 
DtVector2D addOffset2D (const DtVectorOffset3D &vec)
 This derived fn zeros the up component first. More...
 
bool operator== (const DtVector2D &) const
 
bool operator!= (const DtVector2D &orig) const
 
- Public Member Functions inherited from DtVector3D
 DtVector3D ()
 Constructor etc. More...
 
 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. More...
 
void setFromGeocentricVector (const DtVector &geocVec, DtLocation3D &origin)
 This function sets the vector from a Geocentric vector. More...
 
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. More...
 
void setNorthEastDown (const double north, const double east, const double down)
 Reset the vector from north, east, and down (in meters). More...
 
void setBearingInclRange (const double bearing, const double inclination, const double range)
 Reset the vector from bearing, inclination (both in radians), and range in meters. More...
 
double getBearing (void) const
 Set and get functions for different representations. More...
 
double getInclination (void) const
 void setBearing(const double bearing); More...
 
double getRange (void) const
 void setInclination(const double inclination); More...
 
double getNorth (void) const
 void setRange(const double range); More...
 
double getEast (void) const
 void setNorth(double const north); More...
 
double getDown (void) const
 void setEast(double const east); More...
 
DtVector3D getScaled (const double scale) const
 void setDown(double const down); More...
 
DtVector3D getNegated (void) const
 
DtVector3D getUnit (void) const
 
DtVector3D addVector3D (const DtVector3D &vec) const
 Adds another vector3D. More...
 
DtVector3D crossVector3D (const DtVector3D &vec) const
 Takes the cross product of given vector with this one. More...
 
double dotVector3D (const DtVector3D &vec) const
 Takes the dot product of the given vector with this one. More...
 
DtVector3D addOffset (const DtVectorOffset3D &offset) const
 Adds an offset to this vector. More...
 
double headingDiff (const DtVector3D &vec) const
 Determines the difference in headings from this vector to the given vector, in radians. More...
 
DtVectorGeoc3D makeVectorGeoc3DAtLoc (const DtLocation3D &loc) const
 Makes a geocentric vector equivalent to this vector at the given location on the earth. More...
 
bool operator== (const DtVector3D &) const
 
bool operator!= (const DtVector3D &orig) const
 
DtString serialize ()
 Returns a string serialized version of this class. More...
 
bool deserialize (const DtString &data)
 Returns true if it could fill its members with the data contained in the string. More...
 
- 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. More...
 
 DtAsciiSerializable (const DtAsciiSerializable &orig)
 
virtual ~DtAsciiSerializable ()
 
virtual std::string objectTypeC () const
 Returns a std::string version of the objectType. More...
 
virtual void init (void *userData)
 This function is called right after the object is constructed during the deserialization process, but before deserialize() is called. More...
 

Static Public Member Functions

static DtAsciiSerializablecreator ()
 Returns a new object of this type with default values. More...
 
- Static Public Member Functions inherited from DtVector3D
static DtAsciiSerializablecreator ()
 Returns a new object of this type with default values. More...
 

Detailed Description

! DtVector2D is a vector in earth-relative coordinates, e.g.

east-north. Its direction in space depends on where on the earth it is attached (like topocentric coordinates). It contains the 3rd component of the DtVector3D, "down", but it is always zero.

Constructor & Destructor Documentation

DtVector2D::DtVector2D ( )

Constructor etc.

intended for the script interface, not scripts themselves. The constructor assumes that the vect holds north-east-down values. Constructing a 2D vector from a 3D vector just ignores (zeros) the down component.

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

Constructor that is visible to scripts. Values in meters.

Member Function Documentation

DtVector2D& DtVector2D::operator= ( const DtVector3D orig)
DtString DtVector2D::objectType ( ) const
virtual

Returns "DtVector2D".

Reimplemented from DtVector3D.

static DtAsciiSerializable* DtVector2D::creator ( )
static

Returns a new object of this type with default values.

void DtVector2D::setNorth ( const double  north)
void DtVector2D::setEast ( const double  east)
DtVector2D DtVector2D::addVector2D ( const DtVector3D vec)

This fn zeros out the down component.

double DtVector2D::crossVector2D ( const DtVector3D vec)

The cross product returns a scalar instead of a vector.

double DtVector2D::dotVector2D ( const DtVector3D vec)

Returns dot prod of north & east components.

DtVector2D DtVector2D::addOffset2D ( const DtVectorOffset3D vec)

This derived fn zeros the up component first.

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

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)