VisioDevKit-Sample  v2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
VgMyRouteCreator Class Referenceabstract

Interface for Objects responsible for the route creations. More...

Inheritance diagram for VgMyRouteCreator:
Inheritance graph

Public Types

enum  RoutePoint { eStart, eEnd }
 The points that a route may have. More...
 

Public Member Functions

virtual bool setRoutePoint (RoutePoint pPoint, const std::string &pPlaceID)=0
 Sets a RoutePoint to a specific place. More...
 
virtual bool setRoutePoint (RoutePoint pPoint, const VgEngine::VgPosition &pPosition)=0
 Sets a RoutePoint to a position within the map. More...
 
virtual void resetRoutePoint (RoutePoint pPoint)=0
 Resets the place ID associated with a point. More...
 
virtual bool isRoutePointSet (RoutePoint pPoint)=0
 
virtual void computeRoute ()=0
 Computes a route. More...
 
virtual
VgRoutingModule::VgIRouteRequestParameters * 
editRoutingRequestParameters ()=0
 Returns a reference to the routing request parameters that computeRoute uses. More...
 
virtual void resetRoutingRequestParameters ()=0
 Resets the routing request parameters to their initial state. More...
 
virtual VgEngine::VgRefPtr
< VgEngine::VgAnimationDescriptor > 
getRoutePointHighlightAnimationDescriptor ()=0
 Returns the descriptor of an animation intended to emphasize routing points. More...
 
virtual void setAvoidStairs (bool pDisabledFriendly)=0
 Sets up the routing request parameters to include/exclude non disabled-friendly attributes. More...
 
virtual void setRouteStyle (VgMyRouteStyler::RouteStyle pRouteStyle, bool pRecomputeRoute=true)=0
 Change the routing style of lines generated by the routing helper. More...
 
virtual VgMyRouteStyler::RouteStyle getRouteStyle () const =0
 get the current route style More...
 
virtual void setRouteWidth (float pWidth)=0
 Determines the width of the created route. More...
 
virtual void setRouteMarkerHeight (float pHeight)=0
 Set route marker height. More...
 

Detailed Description

Interface for Objects responsible for the route creations.

These methods are called if the VgMyRouteCreator sub-class has been registered with the setRouteCreator() method within VgMyBasicApplicationController.

Member Enumeration Documentation

The points that a route may have.

Enumerator
eStart 

Route start point.

eEnd 

Route end point.

Member Function Documentation

virtual void VgMyRouteCreator::computeRoute ( )
pure virtual

Computes a route.

Remarks
Works only if both end points are set.

Implemented in VgMyBasicApplicationController.

virtual VgRoutingModule::VgIRouteRequestParameters* VgMyRouteCreator::editRoutingRequestParameters ( )
pure virtual

Returns a reference to the routing request parameters that computeRoute uses.

Returns
a reference to the routing request parameters to be used on the next computeRoute.

Implemented in VgMyBasicApplicationController.

virtual VgEngine::VgRefPtr< VgEngine::VgAnimationDescriptor > VgMyRouteCreator::getRoutePointHighlightAnimationDescriptor ( )
pure virtual

Returns the descriptor of an animation intended to emphasize routing points.

Implemented in VgMyBasicApplicationController.

virtual VgMyRouteStyler::RouteStyle VgMyRouteCreator::getRouteStyle ( ) const
pure virtual

get the current route style

Returns
current route style.

Implemented in VgMyBasicApplicationController.

virtual bool VgMyRouteCreator::isRoutePointSet ( RoutePoint  pPoint)
pure virtual
Parameters
pPointRoutePoint to test.
Returns
True if the specified point is already set.

Implemented in VgMyBasicApplicationController.

virtual void VgMyRouteCreator::resetRoutePoint ( RoutePoint  pPoint)
pure virtual

Resets the place ID associated with a point.

Parameters
pPointRoutePoint to reset.

Implemented in VgMyBasicApplicationController.

virtual void VgMyRouteCreator::resetRoutingRequestParameters ( )
pure virtual

Resets the routing request parameters to their initial state.

Implemented in VgMyBasicApplicationController.

virtual void VgMyRouteCreator::setAvoidStairs ( bool  pDisabledFriendly)
pure virtual

Sets up the routing request parameters to include/exclude non disabled-friendly attributes.

Parameters
pDisabledFriendlyTrue if disabled friendly routing is wanted, false if not

Implemented in VgMyBasicApplicationController.

virtual void VgMyRouteCreator::setRouteMarkerHeight ( float  pHeight)
pure virtual

Set route marker height.

Adjust so that the marker appears to be anchored to the top of desired surface.

Parameters
pHeightThe height of the route markers in meters.

Implemented in VgMyBasicApplicationController.

virtual bool VgMyRouteCreator::setRoutePoint ( RoutePoint  pPoint,
const std::string &  pPlaceID 
)
pure virtual

Sets a RoutePoint to a specific place.

Parameters
pPointRoutePoint to set
pPlaceIDPlace to associates with pPoint.
Returns
False if the specified placeID is not routable.

Implemented in VgMyBasicApplicationController.

virtual bool VgMyRouteCreator::setRoutePoint ( RoutePoint  pPoint,
const VgEngine::VgPosition &  pPosition 
)
pure virtual

Sets a RoutePoint to a position within the map.

Finds the closest routing node from the routing network to the given position.

  • pPosition.getMZOrAltitude() is used to determine what layer the position is associated to.
  • Use the method VgMapModule::VgIMapModule::getHeightRangeForLayer() to find the appropriate altitude value for pPosition. For example:
    ...
    double lFloorHeight = 0.0;
    float pHeightMax;
    float pHeightMin;
    std::sring lLayerName = "0";
    if ( mMapModule->getHeightRangeForLayer(pLayer, pHeightMax, pHeightMin))
    {
    lFloorHeight = ((pHeightMax + pHeightMin) / 2);
    }
    lPosition.mZOrAltitude = lFloorHeight;
    ...
    Parameters
    pPointRoutePoint to set
    pPositionPosition to associates with pPoint.
    Returns
    False if the pPosition is not routable.

Implemented in VgMyBasicApplicationController.

virtual void VgMyRouteCreator::setRouteStyle ( VgMyRouteStyler::RouteStyle  pRouteStyle,
bool  pRecomputeRoute = true 
)
pure virtual

Change the routing style of lines generated by the routing helper.

Parameters
pRouteStyleroute style
pRecomputeRoute

Implemented in VgMyBasicApplicationController.

virtual void VgMyRouteCreator::setRouteWidth ( float  pWidth)
pure virtual

Determines the width of the created route.

Parameters
pWidthThe width of the route in meters

Implemented in VgMyBasicApplicationController.


The documentation for this class was generated from the following file:
VisioDevKit 2.0, Visioglobe® 2013