|
virtual | ~VgPositionToolbox () |
|
double | computeDistance (const std::vector< VgPosition > &pPositions) const |
|
double | computeDistance (const VgPosition &pPos1, const VgPosition &pPos2) const |
|
double | computeHeadingAngle (const VgPosition &pPosPivot, const VgPosition &pPos1, const VgPosition &pPos2) const |
|
double | computePitchAngle (const VgPosition &pPosPivot, const VgPosition &pPos1, const VgEngine::VgPosition &pPos2) const |
|
VgPosition | computeMiddlePoint (const VgPosition &pPos1, const VgPosition &pPos2) const |
|
VgPosition | offsetPosition (const VgPosition &pPosition, const double pHeadingInDegrees, const double pPitchInDegrees, const double pDistanceInMeters) const |
|
VgEngine::VgRefPtr< VgEngine::VgSRS > | editGeoReferencedSRS () |
|
VgEngine::VgConstRefPtr< VgEngine::VgSRS > | getGeoReferencedSRS () const |
|
VgEngine::VgRefPtr< VgEngine::VgSRS > | editSceneSRS () |
|
VgEngine::VgConstRefPtr< VgEngine::VgSRS > | getSceneSRS () const |
|
void | convert (VgPosition &pPos, VgEngine::VgConstRefPtr< VgSRS > pSRS) const |
|
void | geoConvert (VgPosition &pPos, VgEngine::VgConstRefPtr< VgSRS > pSRS) const |
|
std::vector< VgEngine::VgPosition > | simplifyLineForWidth (const std::vector< VgEngine::VgPosition > &pPositions, double pWidth) const |
|
bool | isInside2D (const VgEngine::VgPosition &pPosition, const std::vector< VgEngine::VgPosition > &pPolygon) const |
|
Provides various utility methods for VgEngine::VgPosition
virtual VgEngine::VgPositionToolbox::~VgPositionToolbox |
( |
| ) |
|
|
virtual |
VgEngine::VgPositionToolbox::VgPositionToolbox |
( |
VgIEngine & |
pEngine | ) |
|
|
protecteddelete |
VgEngine::VgPositionToolbox::VgPositionToolbox |
( |
| ) |
|
|
protected |
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 middle point of two positions. The positions will be converted to scene SRS with geographic coherence before computing. The result position will be expressed in the georeferenced SRS.
- Parameters
-
pPos1 | The first position. |
pPos2 | The second position. |
- Returns
- The middle point's position in the georeferenced SRS.
- Version
- 2.0.8955
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. |
- Note
- No conversion will take place if the Geograhpical SRS hasn't been initialised. The Geograhpical SRS is initialised as a result of calling the VgIDatabase::selectDataset() method.
- Version
- 2.0
Returns the engine's main georeferenced SRS.
- Version
- 2.0
Returns the scene's metric SRS.
- Version
- 2.0
Utility method to convert a position to a given SRS with geographic coherence.
- 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.8955
Returns the engine's main georeferenced SRS.
- Version
- 2.0
Returns the scene's metric SRS.
- Version
- 2.0
Utility to determine if a position is inside a polygon
- Parameters
-
pPosition | position to test |
pPolygon | vector of points, it assumes the VgSRS of all its points are the same, it should have at least 3 elements. |
- Returns
- true if pPosition is inside the polygon defined by pPolygon points.
- Version
- 2.1.4
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.
Utility to simplify a line (vector of positions) such that the resulting line is simpler and its turn's radius is wider than half the width. This function for advanced users is used for computing positions and subsequently creating lines to be seen at different distances.
- Parameters
-
pPositions | input vector of positions |
pWidth | The width of the line that is to be simplified. The larger the width, the greater the simplifiction of the line's position vector. |
- Returns
- new positions vector with less or equal number of points.
- Version
- 2.0.8955
friend class VgEngine::VgObjectBridge |
|
friend |
Private* VgEngine::VgPositionToolbox::mPrivate |
|
protected |
The documentation for this class was generated from the following file: