![]() |
VR-Forces 5.0.3 Developer's Guide
|
A location3D is a point in space, i.e. a geocentric coordinate.

Protected Attributes | |
| DtGeodeticCoord | myGeodLocation |
| DtString | objectType () const |
| DtString | serialize () |
| bool | deserialize (const DtString &data) |
| static DtAsciiSerializable * | creator () |
| DtLocation3D::DtLocation3D | ( | const DtVector & | vect | ) |
Private constructor, visible to the interface but not for use in the scripts themselves.
The constructor using a DtVector assumes that the vector holds geocentric coordinates, not geodetic.
| DtLocation3D::DtLocation3D | ( | const DtGeodeticCoord & | geodCoord | ) |
| DtLocation3D::DtLocation3D | ( | const DtLocation3D & | orig | ) |
| DtLocation3D::DtLocation3D | ( | ) |
| DtLocation3D::~DtLocation3D | ( | ) |
| DtLocation3D::DtLocation3D | ( | const double | latitude, |
| const double | longitude, | ||
| const double | altitudeMSL | ||
| ) |
This constructor will be visible from the scripts. Lat an Lon in radians.
| DtLocation3D& DtLocation3D::operator= | ( | const DtLocation3D & | orig | ) |
| DtLocation3D DtLocation3D::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.
|
virtual |
|
virtual |
Returns a string serialized version of this class.
Implements DtAsciiSerializable.
Returns true if it could fill its members with the data contained in the string. False otherwise.
Implements DtAsciiSerializable.
|
static |
Returns a new object of this type with default values.
| DtVector DtLocation3D::getGeocentric | ( | ) | const |
These functions get the underlying DtVector representation; they are intended for use by functions that interface between the simulation infrastructure (e.g. VRF Objects) and scripts/behavior code, not by the scripts directly.
| DtGeodeticCoord DtLocation3D::geodLocation | ( | ) | const |
| void DtLocation3D::setGeodeticFromVector | ( | const DtVector & | geodeticData | ) |
These functions initialize a location from a vector containing lat, lon, alt (rather than geocentric coordinates), and return a vector with lat, lon, alt. They are intended to allow storage in a DtVector, e.g in a PSR. When get... is used, it is assumed that a geodetic coordinate.
| DtVector DtLocation3D::getGeodeticVector | ( | void | ) | const |
| double DtLocation3D::getLat | ( | ) | const |
Gets or sets the latitude, longitude, and altitude above sea level. All angles are in radians.
| void DtLocation3D::setLat | ( | const double | lat | ) |
Gets or sets the latitude, longitude, and altitude above sea level. All angles are in radians.
| double DtLocation3D::getLon | ( | ) | const |
Gets or sets the latitude, longitude, and altitude above sea level. All angles are in radians.
| void DtLocation3D::setLon | ( | const double | lon | ) |
Gets or sets the latitude, longitude, and altitude above sea level. All angles are in radians.
| double DtLocation3D::getAlt | ( | ) | const |
Gets or sets the latitude, longitude, and altitude above sea level. All angles are in radians.
| void DtLocation3D::setAlt | ( | const double | alt | ) |
Gets or sets the latitude, longitude, and altitude above sea level. All angles are in radians.
| double DtLocation3D::distanceToLocation3D | ( | const DtLocation3D & | location | ) | const |
Computes the distance between two locations in space.
| bool DtLocation3D::isNearLocation3D | ( | const DtLocation3D & | loc, |
| const double | error | ||
| ) | const |
| bool DtLocation3D::isInsidePolygon | ( | const std::vector< DtLocation3D > | polyPoints | ) | const |
Determines if this point is inside the given polygon. The polygon points can go around in either clockwise or counter clockwise direction. The polygon must be convex.
| bool DtLocation3D::isLeftOfLine | ( | const DtLocation3D & | loc1, |
| const DtLocation3D & | loc2 | ||
| ) | const |
Determines if this point is to the left of the line defined by the given two points. This implementation assumes "left" is from the point of view of an observer who is upright on the earth (at point 1).
| DtVector3D DtLocation3D::vectorToLoc3D | ( | const DtLocation3D & | location | ) | const |
Computes the distance between two points, around a great circle path, with linear elevation change. double greatCircleDistanceToLocation3D(const DtLocation3D &location);.
Gets an vector in earth-relative coordinates to the given location. I.e., east-north or heading-distance. The inclination would be 0.0 if the two points were at the same altitude, even around the curve of the earth.
| DtVectorGeoc3D DtLocation3D::vectorGeocToLoc3D | ( | const DtLocation3D & | location | ) | const |
Gets an absolute, i.e. geocentric, line-of-sight, vector to the location.
| DtLocation3D DtLocation3D::addVector3D | ( | const DtVector3D & | vec | ) | const |
Adds a vector in earth-relative coordinates to the given location.
| DtLocation3D DtLocation3D::addVectorGeoc3D | ( | const DtVectorGeoc3D & | vec | ) | const |
Adds an absolute, i.e. geocentric, vector to the location. Returns the new location.
Sets the location using geocentric coordinates.
Gets the location in geocentric coordinates.
| bool DtLocation3D::operator== | ( | const DtLocation3D & | ) | const |
|
inline |
|
protected |
The private data. Kept in geodetic (lat, lon, alt) (units radians, radians, meters) assuming that more computations are going to be done in topo coordinates.