This struct encapsulates a 3D position. More...
Public Member Functions | |
VgPosition () | |
Default constructor. | |
VgPosition (VgEngine::VgConstRefPtr< VgEngine::VgSRS >const &pSRS) | |
Constructor. | |
VgPosition (const VgPosition &pOther) | |
Copy constructor. | |
VgPosition (double pXOrLongitude, double pYOrLatitude, double pZOrAltitude) | |
constructor for WGS84 position (because it uses NULL SRS). | |
VgPosition (double pXOrLongitude, double pYOrLatitude, double pZOrAltitude, VgEngine::VgConstRefPtr< VgEngine::VgSRS >const &pSRS) | |
constructor for position with SRS. | |
bool | operator== (const VgPosition &pPositionToCompare) const |
This is an equality test operator. | |
bool | operator!= (const VgPosition &pPositionToCompare) const |
This is an inequality test operator. | |
Public Attributes | |
VgEngine::VgConstRefPtr < VgEngine::VgSRS > | mSRS |
The SRS the position is expressed in. | |
double | mXOrLongitude |
Depending on the SRS used this may be local metric X coordinate, or longitude. | |
double | mYOrLatitude |
Depending on the SRS used this may be local metric Y coordinate, or latitude. | |
double | mZOrAltitude |
Depending on the SRS used this may be local metric Z coordinate, or altitude. |
This struct encapsulates a 3D position.
This interpretation of the contents depends on the spatial reference system member. As of now, it can either be local metric coordinates (x, y, z) or WGS84 coordinates (latitude, longitude, altitude) in decimal degrees (and meters above water for altitude).
VgEngine::VgPosition::VgPosition | ( | ) | [inline] |
Default constructor.
Initializes to default values: mYOrLatitude = 0.0 mXOrLongitude = 0.0 mZOrAltitude = 0.0 mSRS = NULL
VgEngine::VgPosition::VgPosition | ( | VgEngine::VgConstRefPtr< VgEngine::VgSRS >const & | pSRS ) | [inline] |
Constructor.
Initializes to default values: mYOrLatitude = 0.0 mXOrLongitude = 0.0 mZOrAltitude = 0.0
pSRS | A pointer to the spatiual reference system to express the position in. |
VgEngine::VgPosition::VgPosition | ( | const VgPosition & | pOther ) | [inline] |
Copy constructor.
Initializes the position.
pOther | The position object to copy. |
VgEngine::VgPosition::VgPosition | ( | double | pXOrLongitude, |
double | pYOrLatitude, | ||
double | pZOrAltitude | ||
) | [inline] |
constructor for WGS84 position (because it uses NULL SRS).
pXOrLongitude | longitude of point |
pYOrLatitude | latitude of point |
pZOrAltitude | altitude of point. |
Initializes to default values: mSRS = NULL
VgEngine::VgPosition::VgPosition | ( | double | pXOrLongitude, |
double | pYOrLatitude, | ||
double | pZOrAltitude, | ||
VgEngine::VgConstRefPtr< VgEngine::VgSRS >const & | pSRS | ||
) | [inline] |
constructor for position with SRS.
The parameters will be interpreted as a function of the pSRS parameters.
pXOrLongitude | longitude of point |
pYOrLatitude | latitude of point |
pZOrAltitude | altitude of point. |
pSRS | A pointer to the spatiual reference system to express the position in. |
bool VgEngine::VgPosition::operator!= | ( | const VgPosition & | pPositionToCompare ) | const [inline] |
This is an inequality test operator.
pPositionToCompare | The position to compare. |
bool VgEngine::VgPosition::operator== | ( | const VgPosition & | pPositionToCompare ) | const [inline] |
This is an equality test operator.
pPositionToCompare | The position to compare to. |
The SRS the position is expressed in.
If NULL, it means the position is expressed in WGS84 coordinates.
Depending on the SRS used this may be local metric X coordinate, or longitude.
Depending on the SRS used this may be local metric Y coordinate, or latitude.
Depending on the SRS used this may be local metric Z coordinate, or altitude.