Provides various utility methods for VgEngine::VgPosition.
More...
List of all members.
Public Member Functions |
| VgPositionToolbox (VgIEngine &pEngine) |
| Class contructor.
|
virtual | ~VgPositionToolbox () |
| class destructor.
|
double | computeDistance (const std::vector< VgPosition > &pPositions) const |
| Computes the distance in meters from an ordered sequence of positions.
|
double | computeDistance (const VgPosition &pPos1, const VgPosition &pPos2) const |
| Computes the distance in meters between two positions.
|
double | computeHeadingAngle (const VgPosition &pPosPivot, const VgPosition &pPos1, const VgPosition &pPos2) const |
| Computes the heading angle, in degrees, between Pos1-Pivot and Pos2-Pivot.
|
double | computePitchAngle (const VgPosition &pPosPivot, const VgPosition &pPos1, const VgEngine::VgPosition &pPos2) const |
| Computes the pitch angle, in degrees, between Pos1-Pivot and Pos2-Pivot.
|
VgPosition | offsetPosition (const VgPosition &pPosition, const double pHeadingInDegrees, const double pPitchInDegrees, const double pDistanceInMeters) const |
| Offsets a position with a distance in meters given a direction.
|
VgEngine::VgRefPtr
< VgEngine::VgSRS > | editGeoReferencedSRS () |
| Returns the engine's main georeferenced SRS.
|
VgEngine::VgConstRefPtr
< VgEngine::VgSRS > | getGeoReferencedSRS () const |
| Returns the engine's main georeferenced SRS.
|
VgEngine::VgRefPtr
< VgEngine::VgSRS > | editSceneSRS () |
| Returns the scene's metric SRS.
|
VgEngine::VgConstRefPtr
< VgEngine::VgSRS > | getSceneSRS () const |
| Returns the scene's metric SRS.
|
void | convert (VgPosition &pPos, VgEngine::VgConstRefPtr< VgSRS > pSRS) const |
| Utility method to convert a position to a given SRS.
|
Protected Attributes |
Private * | mPrivate |
Friends |
class | VgEngine::VgIEngine |
class | VgEngine::VgObjectBridge |
Detailed Description
Provides various utility methods for VgEngine::VgPosition.
Constructor & Destructor Documentation
VgEngine::VgPositionToolbox::VgPositionToolbox |
( |
VgIEngine & |
pEngine ) |
|
virtual VgEngine::VgPositionToolbox::~VgPositionToolbox |
( |
) |
[virtual] |
Member Function Documentation
double VgEngine::VgPositionToolbox::computeDistance |
( |
const std::vector< VgPosition > & |
pPositions ) |
const |
Computes the distance in meters from an ordered sequence of positions.
- Parameters:
-
pPositions | An ordered sequence of positions. |
- Returns:
- The total distance in meters. 0.0 if the parameter pPositions contains 0 or 1 elements. NaN if an error occurs.
double VgEngine::VgPositionToolbox::computeDistance |
( |
const VgPosition & |
pPos1, |
|
|
const VgPosition & |
pPos2 |
|
) |
| const |
Computes the distance in meters between two positions.
- Parameters:
-
pPos1 | Position one |
pPos2 | Position two |
- Returns:
- The distance in meters. NaN if an error occurs.
Computes the heading angle, in degrees, between Pos1-Pivot and Pos2-Pivot.
- Parameters:
-
pPosPivot | Pivot Position |
pPos1 | Position one |
pPos2 | Position two |
- Returns:
- Heading angle in degrees [0,360] (0 for north, increasing in value starting from the east). If at least two positions are equal, the result is undefined. NaN if an error occurs.
Computes the pitch angle, in degrees, between Pos1-Pivot and Pos2-Pivot.
- Parameters:
-
pPosPivot | Pivot Position |
pPos1 | Position 1 |
pPos2 | Position 2 |
- Returns:
- Pitch angle in degrees [-90,90] (0 to look "forward" towards the horizon, negative values look down). NaN if an error occurs.
Utility method to convert a position to a given SRS.
- Parameters:
-
pPos | The position to convert. |
pSRS | The spatial reference system in which to convert the position. If NULL it is assumed that WGS84 is wanted. |
- Version:
- 2.0
Returns the engine's main georeferenced SRS.
- Version:
- 2.0
Returns the scene's metric SRS.
- Version:
- 2.0
Returns the engine's main georeferenced SRS.
- Version:
- 2.0
Returns the scene's metric SRS.
- Version:
- 2.0
VgPosition VgEngine::VgPositionToolbox::offsetPosition |
( |
const VgPosition & |
pPosition, |
|
|
const double |
pHeadingInDegrees, |
|
|
const double |
pPitchInDegrees, |
|
|
const double |
pDistanceInMeters |
|
) |
| const |
Offsets a position with a distance in meters given a direction.
- Parameters:
-
pPosition | Start position |
pHeadingInDegrees | Heading in degrees [0,360] (0 for north, increasing value start to east). |
pPitchInDegrees | Pitch in degrees [-90,90] (0 to look "forward" towards the horizon, negative values to look down) |
pDistanceInMeters | Distance in meters |
- Returns:
- Offset position. If an error occurs, all components of the position are set to NaN.
Friends And Related Function Documentation
friend class VgEngine::VgObjectBridge [friend] |
Member Data Documentation
The documentation for this class was generated from the following file: