public class VgINavigation extends VgReferenced
Modifier and Type | Method and Description |
---|---|
void |
addListener(VgINavigationListenerRefPtr pListener)
Adds a listener to the navgiation object.
|
void |
delete() |
VgPosition |
getClosestPositionOnRoute()
Calculates the closest position on the route, given the current position
(VgINavigation::getCurrentPosition()).
|
long |
getCurrentInstructionIndex()
Gets the index of the active instruction.
|
VgPosition |
getCurrentPosition()
Gets the last position that was notified.
|
double |
getDistanceFromRoute()
Gets the distance between current position (VgINavigation::getCurrentPosition()) and
closest position on route
|
VgINavigationInstructionConstRefPtr |
getInstruction(long pIndex)
Gets a navigation instruction
|
double |
getInstructionGeofenceDistance()
Gets the distance in meters of the threshold when to switch instructions.
|
long |
getNumInstructions()
Gets the number of navigation instructions
|
VgINavigationRequestParameters |
getRequestParameters() |
void |
removeListener(VgINavigationListenerRefPtr pListener)
Removes a listener from the navigation object.
|
void |
setInstructionGeofenceDistance(double pDistanceInMeters)
Sets the distance in meters of the threshold when to switch instructions.
|
void |
updateCurrentPosition(VgPosition pPosition,
double pTime)
Injects new position.
|
getNbReferences, ref, unref
public void delete()
delete
in class VgReferenced
public void addListener(VgINavigationListenerRefPtr pListener)
pListener
- The navigation listener to be added.public void removeListener(VgINavigationListenerRefPtr pListener)
pListener
- The navigation listener to be removed.public VgINavigationInstructionConstRefPtr getInstruction(long pIndex)
pIndex
- index of instructionpublic long getNumInstructions()
public void updateCurrentPosition(VgPosition pPosition, double pTime)
pPosition
- The new current position. The attribute mZOrAltitude of this parameter
will be used to determine the corresponding layer within the map. In order for pPosition
to be valid it must fall within the boundary of the map (VgEngine::VgIDatabaseDatasetDescriptor)
and the mZOrAltitude must fall within a layer range (VgMapModule::VgIMapModule::getHeightRangeForLayer)pTime
- Time of the position capture. Will be used when notifying any registered
navigation listeners, (VgNavigationModule::VgINavigationListener::notifyPositionUpdated).
If unknown, use 0.public VgPosition getCurrentPosition()
public long getCurrentInstructionIndex()
public VgPosition getClosestPositionOnRoute()
public double getDistanceFromRoute()
public void setInstructionGeofenceDistance(double pDistanceInMeters)
pDistanceInMeters
- Radius distance in meters.public double getInstructionGeofenceDistance()
public VgINavigationRequestParameters getRequestParameters()