VgIRoutingSolver will calculate a route between several waypoints. More...
Public Member Functions | |
| virtual | ~VgIRoutingSolver () |
| Destructor. | |
| virtual VgIRouteRequest * | computeRoute (VgIRouteRequestParameters *pParameters)=0 |
| Computes a route given some parameters. | |
| virtual VgEngine::VgRefPtr < VgRoutingModule::VgIRoutingNode > | getRoutingNode (const VgEngine::VgPosition &pPosition) const =0 |
| Gets the closest node to a given position. | |
| virtual VgEngine::VgRefPtr < VgRoutingModule::VgIRoutingNode > | getRoutingNode (const std::string &pPoiID) const =0 |
| Gets the virtual node associated with a given poi. | |
Protected Member Functions | |
| VgIRoutingSolver () | |
| Constructor. | |
VgIRoutingSolver will calculate a route between several waypoints.
| VgRoutingModule::VgIRoutingSolver::VgIRoutingSolver | ( | ) | [inline, protected] |
Constructor.
| virtual VgRoutingModule::VgIRoutingSolver::~VgIRoutingSolver | ( | ) | [inline, virtual] |
Destructor.
| virtual VgIRouteRequest* VgRoutingModule::VgIRoutingSolver::computeRoute | ( | VgIRouteRequestParameters * | pParameters ) | [pure virtual] |
Computes a route given some parameters.
| pParameters | Parameters to determine the route to be computed. A notify function will be called on callback within pParameters once the route has been computed. |
| virtual VgEngine::VgRefPtr< VgRoutingModule::VgIRoutingNode > VgRoutingModule::VgIRoutingSolver::getRoutingNode | ( | const std::string & | pPoiID ) | const [pure virtual] |
Gets the virtual node associated with a given poi.
Note: A poi may have several access nodes. The poi's virtual node represents all these access nodes when a route is requested. However the computed route will use only one of the access nodes and never the virtual node.
| pPoiID | A const reference on a string containing the poi's ID. |
| virtual VgEngine::VgRefPtr< VgRoutingModule::VgIRoutingNode > VgRoutingModule::VgIRoutingSolver::getRoutingNode | ( | const VgEngine::VgPosition & | pPosition ) | const [pure virtual] |
Gets the closest node to a given position.
Note the altitude/height of the position is used to determine the layer of the returned routing node.
Example:
...
// Need to update the lat/long for lMyPos.
VgEngine::VgPosition lMyPos;
std::string lLayerName = "0"; // For example
float lHeightMax;
float lHeightMin;
float lFloorHeight = 0.0;
if ( lMapModule->getHeightRangeForLayer(lLayerName, lHeightMax, lHeightMin) )
{
lFloorHeight = ((lHeightMax + lHeightMin) / 2);
}
// IMPORTANT:
// Set the floor height before requesting the routing node
lMyPos.mZOrAltitude = lFloorHeight;
lRoutingModule->getRoutingSolver()->getRoutingNode(lMyPos);
...
| pPosition | A const reference on the position. |