![]() |
VR-Forces Developer's Guide
|
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.

Public Member Functions | |
| DtVector2D () | |
| DtVector2D (const DtVector &vect) | |
| DtVector2D (const DtVector3D &vect) | |
| virtual | ~DtVector2D () override |
| DtVector2D & | operator= (const DtVector3D &orig) |
| DtVector2D (const double north, const double east) | |
| virtual DtString | objectType () const override |
| void | setNorth (const double north) |
| void | setEast (const double east) |
| DtVector2D | addVector2D (const DtVector3D &vec) |
| double | crossVector2D (const DtVector3D &vec) |
| double | dotVector2D (const DtVector3D &vec) |
| DtVector2D | addOffset2D (const DtVectorOffset3D &vec) |
| bool | operator== (const DtVector2D &) const |
| bool | operator!= (const DtVector2D &orig) const |
Public Member Functions inherited from DtVector3D | |
| DtVector3D () | |
| DtVector3D (const DtVector &vect) | |
| DtVector3D (const DtVector3D &vect) | |
| virtual | ~DtVector3D () override |
| DtVector3D & | operator= (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 |
| 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 |
| virtual DtString | serialize () override |
| virtual bool | deserialize (const DtString &data) override |
Public Member Functions inherited from DtAsciiSerializable | |
| DtAsciiSerializable () | |
| DtAsciiSerializable (const DtAsciiSerializable &orig) | |
| virtual | ~DtAsciiSerializable () |
| virtual std::string | objectTypeC () const |
| virtual void | init (void *userData) |
Static Public Member Functions | |
| static DtAsciiSerializable * | creator () |
Static Public Member Functions inherited from DtVector3D | |
| static DtAsciiSerializable * | creator () |
| 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 | ) |
|
overridevirtual |
Constructor that is visible to scripts. Values in meters.
| DtVector2D& DtVector2D::operator= | ( | const DtVector3D & | orig | ) |
|
overridevirtual |
Returns "DtVector2D".
Reimplemented from DtVector3D.
|
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 |
|
inline |