VisioMove SDK (Android)  2.1.22
 All Classes Functions Variables Pages
VgINavigationConstRefPtr Class Reference

Public Member Functions

 VgINavigationConstRefPtr ()
 VgINavigationConstRefPtr (VgINavigation pPointer)
 VgINavigationConstRefPtr (VgINavigationConstRefPtr pConstRefPtr)
VgINavigationConstRefPtr set (VgINavigation pPointer)
VgINavigation __ref__ ()
VgINavigation __deref__ ()
VgINavigation get ()
boolean isValid ()
VgINavigationInstructionConstRefPtr getInstruction (long pIndex)
long getNumInstructions ()
VgPosition getCurrentPosition ()
long getCurrentInstructionIndex ()
VgPosition getClosestPositionOnRoute ()
double getDistanceFromRoute ()
long getCurrentInstructionClosestPositionNextSubIndex ()
double getInstructionGeofenceDistance ()
VgINavigationRequestParameters getRequestParameters ()
void ref ()
int unref ()
int getNbReferences ()

Static Public Member Functions

static VgINavigationConstRefPtr getNull ()

Detailed Description

VgINavigation represents a Navigation object

Constructor & Destructor Documentation

VgINavigationConstRefPtr.VgINavigationConstRefPtr ( )
VgINavigationConstRefPtr.VgINavigationConstRefPtr ( VgINavigation  pPointer)
VgINavigationConstRefPtr.VgINavigationConstRefPtr ( VgINavigationConstRefPtr  pConstRefPtr)

Member Function Documentation

VgINavigation VgINavigationConstRefPtr.__deref__ ( )
VgINavigation VgINavigationConstRefPtr.__ref__ ( )
VgINavigation VgINavigationConstRefPtr.get ( )
VgPosition VgINavigationConstRefPtr.getClosestPositionOnRoute ( )

Calculates the closest position on the route, given the current position ( VgINavigation::getCurrentPosition() ).

you can use VgRoutingModule::VgIRoutingSolver::getRoutingNode and VgRoutingModule::VgIRoutingNode::getPosition to obtain the position on the routing network where there is no navigation.
See also
Position on route, if no position has been injected, it will return the first position of the navigation.
long VgINavigationConstRefPtr.getCurrentInstructionClosestPositionNextSubIndex ( )

Used to determine where on the current instruction the closest position on route is.

// Example how to draw a line while doing a Navigation from the closest position on the route to the end of the current instruction
void MyDrawNavigationListener::notifyPositionUpdated (VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation >
const& pNavigation
const VgEngine::VgPosition &,double)
// hide previous line
unsigned int lNbInstructions = pNavigation->getNumInstructions();
unsigned int lCurrentInstructnionIndex = pNavigation->getCurrentInstructionIndex();
// This is the next index on the current instruction positions after the closest position.
unsigned int lPositionNextSubIndex = pNavigation->getCurrentInstructionClosestPositionNextSubIndex();
VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigationInstruction > mInstruction;
mInstruction = pNavigation->getInstruction(lCurrentInstructnionIndex);
VgEngine::VgPosition lClosestPosition = pNavigation->getClosestPositionOnRoute();
const std::vector<VgEngine::VgPosition>& lInstructionPositions = mInstruction->getInstructionPositions();
VgEngine::VgRefPtr< Vg3DModule::VgLineDescriptor > lCurrentLD = Vg3DModule::VgLineDescriptor::create();
// Push closest position
lClosestPosition.mZOrAltitude = lLineAltitude;
// For each position, flatten height, and add it to line descriptor
std::vector<VgEngine::VgPosition>::const_iterator lPosIter;
for (lPosIter = (lInstructionPositions.begin() + lPositionNextSubIndex);
lPosIter != lInstructionPositions.end();
VgEngine::VgPosition lPosition = *lPosIter;
lPosition.mZOrAltitude = lLineAltitude;
// Complete the line descriptor e.g. color and width information
// Instantiate the line descriptor, and show it (set its layer)
the index of the next position in VgINavigationInstruction::getInstructionPositions after the getClosestPositionOnRoute(). Initial value is 1, maximum value is currentInstruction getPositions().size()
long VgINavigationConstRefPtr.getCurrentInstructionIndex ( )

Gets the index of the active instruction. The value will be the same as the last value given by VgINavigationListener::notifyNewInstruction() .

The index of the active instruction, initial value is 0.
VgPosition VgINavigationConstRefPtr.getCurrentPosition ( )

Gets the last position that was notified. This value will be the same as the last value given by VgINavigationListener::notifyPositionUpdated() .

2.1.3 Updated default value when it has not been initialized.
Last injected position, if no position has been injected, it will return the first position of the navigation.
double VgINavigationConstRefPtr.getDistanceFromRoute ( )

Gets the distance between current position ( VgINavigation::getCurrentPosition() ) and closest position on route

2.1.3 Updated default value when it has not been initialized.
Distance in meters from route. If no position has been injected, it will return 0.
VgINavigationInstructionConstRefPtr VgINavigationConstRefPtr.getInstruction ( long  pIndex)

Gets a navigation instruction

pIndexindex of instruction
Instruction with index pIndex, or NULL if pIndex >+ VgINavigation::getNumInstructions ()
double VgINavigationConstRefPtr.getInstructionGeofenceDistance ( )

Gets the distance in meters of the threshold when to switch instructions.

the radius distance in meters. Default value is 2.5 meters
int VgINavigationConstRefPtr.getNbReferences ( )
static VgINavigationConstRefPtr VgINavigationConstRefPtr.getNull ( )
long VgINavigationConstRefPtr.getNumInstructions ( )

Gets the number of navigation instructions

Number of instructions
VgINavigationRequestParameters VgINavigationConstRefPtr.getRequestParameters ( )
2.1.8 cleared mCallback to avoid possible circular dependencies.
the NavigationRequest parameters with which the request was made, without the callback.
boolean VgINavigationConstRefPtr.isValid ( )
void VgINavigationConstRefPtr.ref ( )
VgINavigationConstRefPtr VgINavigationConstRefPtr.set ( VgINavigation  pPointer)
int VgINavigationConstRefPtr.unref ( )

The documentation for this class was generated from the following file:
VisioMove 2.1.22, Visioglobe® 2016