VisioMove-Sample  2.1.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
VgMyRoutingHelper Class Reference

Provides common operation on routes. More...

Inheritance diagram for VgMyRoutingHelper:
Inheritance graph

Classes

struct  LineObject
 Holds information on Lines to ease show/hide. More...
 
struct  PointObject
 Holds information on Points to ease show/hide. More...
 

Public Member Functions

 VgMyRoutingHelper (VgApplication::VgIApplication *pVgApplication, VgMyTextureLoader *pTextureLoader, VgEngine::VgRefPtr< VgRoutingModule::VgIRouteCallback >const &pCallback, VgMyLayerAndCameraHandler *pLayerAndCamerHandler)
 Constructor. More...
 
virtual ~VgMyRoutingHelper ()
 
virtual bool setRoutePoint (VgMyRouteCreator::RoutePoint pPoint, const std::string &pPlaceID)
 Implementation of interface : VgMyRouteCreator. More...
 
virtual bool setRoutePoint (RoutePoint pPoint, const VgEngine::VgPosition &pPosition)
 
virtual void resetRoutePoint (VgMyRouteCreator::RoutePoint pPoint)
 
virtual bool isRoutePointSet (VgMyRouteCreator::RoutePoint pPoint)
 
virtual void computeRoute ()
 
virtual
VgRoutingModule::VgIRouteRequestParameters * 
editRoutingRequestParameters ()
 
virtual void resetRoutingRequestParameters ()
 
virtual void setAvoidStairs (bool pDisabledFriendly)
 
VgEngine::VgRefPtr
< VgEngine::VgAnimationDescriptor > 
getRoutePointHighlightAnimationDescriptor ()
 
void setRouteStyle (VgMyRouteStyler::RouteStyle pRouteStyle, bool pRecomputeRoute=true)
 
VgMyRouteStyler::RouteStyle getRouteStyle () const
 
void setRouteWidth (float pWidth)
 
void setRouteMarkerHeight (float pHeight)
 
bool createRouteObjects (VgEngine::VgConstRefPtr< VgRoutingModule::VgIRoute > const &pRoute)
 Implementation of interface : VgMyRouteDisplay. More...
 
void clear ()
 
void show ()
 
void hide ()
 
bool isVisible ()
 
void setPoiCallback (const std::string &pIdentifier, VgEngine::VgRefPtr< Vg3DModule::VgIGeometryCallback >const &pCallback)
 Implementation of interface : VgMyPoiConfigurationSetter. More...
 
bool setRoutePoint (RoutePoint pPoint, const VgEngine::VgPosition &pPosition, const std::string &pLayerName)
 Sets a RoutePoint to a position and layer within the map. More...
 

Static Public Attributes

static const std::string kStartPointStrID
 
static const std::string kEndPointStrID
 

Protected Types

typedef std::map< std::string,
VgEngine::VgRefPtr
< Vg3DModule::VgIGeometryCallback > > 
POICallbackMap
 

Protected Member Functions

double computeFloorHeightFromLayer (const std::string &pLayer) const
 
bool isPlaceRoutable (const std::string &pID)
 
bool isPositionRoutable (const VgEngine::VgPosition &pPosition)
 
void requestRoute (const VgEngine::VgRefPtr< VgRoutingModule::VgIRoutingNode > pOrigin, const VgEngine::VgRefPtr< VgRoutingModule::VgIRoutingNode > pDestination)
 Requests a route from the routing module given some routing nodes. More...
 
void createAndAddRouteMarker (VgMyRouteCreator::RoutePoint pPoint, const VgEngine::VgPosition &pPosition, const std::string &pLayerName)
 Add a route marker to the map. More...
 
void removeRouteMarkers ()
 
std::string getLayerNameForPosition (const VgEngine::VgPosition &pPosition)
 
VgEngine::VgPosition getPositionOfPlace (const std::string &pPlaceId)
 
std::string getLayerNameOfPlace (const std::string &pPlaceId)
 

Protected Attributes

VgApplication::VgIApplication * mVgApplication
 
VgEngine::VgInstanceFactory * mInstanceFactory
 
VgMyTextureLoadermTextureLoader
 
VgEngine::VgRefPtr
< VgRoutingModule::VgIRouteCallback > 
mCallback
 
std::map
< VgMyRouteCreator::RoutePoint,
VgEngine::VgRefPtr
< VgRoutingModule::VgIRoutingNode > > 
mRoutePoints
 
VgRoutingModule::VgIRouteRequestParameters mRoutingRequestParameters
 
VgRoutingModule::VgIRoutingModule * mRoutingModule
 
VgRoutingModule::VgIRoutingSolver * mRouteSolver
 
VgRoutingModule::VgIRouteConverter * mRouteConverter2D
 
VgMapModule::VgIMapModule * mMapModule
 
std::map
< VgMyRouteCreator::RoutePoint,
VgEngine::VgRefPtr
< Vg3DModule::VgPoint > > 
mHighlightedRoutePoints
 
bool mIsRouteVisible
 
VgMyRouteStyler::RouteStyle mRouteStyle
 
std::vector< PointObjectmPoints
 
std::list< VgEngine::VgRefPtr
< Vg3DModule::VgLink > > 
mLinks
 
std::vector< LineObjectmLines
 
POICallbackMap mRoutePoiCallbacks
 
float mObjectHeightOffset
 
float mRouteWidth
 
VgMyLayerAndCameraHandlermLayerAndCameraHandler
 
VgEngine::VgRefPtr
< VgEngine::VgAnimationDescriptor > 
mHighlightedRoutePointsAnimationDescr
 
VgMyRouteStyler mRouteStyler
 

Detailed Description

Provides common operation on routes.

This helper simplifies the task of managing a route and showing/hiding it when changing floors (layers).

IMPLEMENTATION TIPS: In this class, you can configure :

  • The image used for the route.
  • The starting&ending POIs (images, callback etc etc)

Member Typedef Documentation

typedef std::map<std::string, VgEngine::VgRefPtr< Vg3DModule::VgIGeometryCallback > > VgMyRoutingHelper::POICallbackMap
protected

Constructor & Destructor Documentation

VgMyRoutingHelper::VgMyRoutingHelper ( VgApplication::VgIApplication *  pVgApplication,
VgMyTextureLoader pTextureLoader,
VgEngine::VgRefPtr< VgRoutingModule::VgIRouteCallback >const &  pCallback,
VgMyLayerAndCameraHandler pLayerAndCamerHandler 
)

Constructor.

You can customize the textures here.

virtual VgMyRoutingHelper::~VgMyRoutingHelper ( )
virtual

Member Function Documentation

void VgMyRoutingHelper::clear ( )
double VgMyRoutingHelper::computeFloorHeightFromLayer ( const std::string &  pLayer) const
protected
virtual void VgMyRoutingHelper::computeRoute ( )
virtual
void VgMyRoutingHelper::createAndAddRouteMarker ( VgMyRouteCreator::RoutePoint  pPoint,
const VgEngine::VgPosition &  pPosition,
const std::string &  pLayerName 
)
protected

Add a route marker to the map.

Uses a RoutePoint to determine if it is start or end. Uses the position to place the point. Uses the pLayerName to determine which layer to put point, if the pLayerName is empty it will use the altitude of the pPosition to determine the layer. Use the pLayerName to reduce the computation or to select the right layer on maps that have multiple layers at the same height (e.g. multibuilding scenarios)

Parameters
pPointrouting node either start or end
pPositionto place point
[pLayer]layername of point if known.
Version
2.1.2
bool VgMyRoutingHelper::createRouteObjects ( VgEngine::VgConstRefPtr< VgRoutingModule::VgIRoute > const &  pRoute)

Implementation of interface : VgMyRouteDisplay.

Creates the routes and its associated POIs

You can customize the route display as well as its starting&ending points.

virtual VgRoutingModule::VgIRouteRequestParameters* VgMyRoutingHelper::editRoutingRequestParameters ( )
virtual
std::string VgMyRoutingHelper::getLayerNameForPosition ( const VgEngine::VgPosition &  pPosition)
protected
std::string VgMyRoutingHelper::getLayerNameOfPlace ( const std::string &  pPlaceId)
protected
VgEngine::VgPosition VgMyRoutingHelper::getPositionOfPlace ( const std::string &  pPlaceId)
protected
VgEngine::VgRefPtr< VgEngine::VgAnimationDescriptor > VgMyRoutingHelper::getRoutePointHighlightAnimationDescriptor ( )
VgMyRouteStyler::RouteStyle VgMyRoutingHelper::getRouteStyle ( ) const
void VgMyRoutingHelper::hide ( )
bool VgMyRoutingHelper::isPlaceRoutable ( const std::string &  pID)
protected
Returns
true if the pID is routable
bool VgMyRoutingHelper::isPositionRoutable ( const VgEngine::VgPosition &  pPosition)
protected
Returns
true if the pPosition is routable, uses its altitude to figure out floor.
virtual bool VgMyRoutingHelper::isRoutePointSet ( VgMyRouteCreator::RoutePoint  pPoint)
virtual
bool VgMyRoutingHelper::isVisible ( )
void VgMyRoutingHelper::removeRouteMarkers ( )
protected
void VgMyRoutingHelper::requestRoute ( const VgEngine::VgRefPtr< VgRoutingModule::VgIRoutingNode >  pOrigin,
const VgEngine::VgRefPtr< VgRoutingModule::VgIRoutingNode >  pDestination 
)
protected

Requests a route from the routing module given some routing nodes.

Parameters
pOriginrouting node to start from
pDestinationrouting node to finish at
virtual void VgMyRoutingHelper::resetRoutePoint ( VgMyRouteCreator::RoutePoint  pPoint)
virtual
virtual void VgMyRoutingHelper::resetRoutingRequestParameters ( )
virtual
virtual void VgMyRoutingHelper::setAvoidStairs ( bool  pDisabledFriendly)
virtual
void VgMyRoutingHelper::setPoiCallback ( const std::string &  pIdentifier,
VgEngine::VgRefPtr< Vg3DModule::VgIGeometryCallback >const &  pCallback 
)
virtual

Implementation of interface : VgMyPoiConfigurationSetter.

Implements VgMyPoiConfigurationSetter.

void VgMyRoutingHelper::setRouteMarkerHeight ( float  pHeight)
virtual bool VgMyRoutingHelper::setRoutePoint ( VgMyRouteCreator::RoutePoint  pPoint,
const std::string &  pPlaceID 
)
virtual

Implementation of interface : VgMyRouteCreator.

virtual bool VgMyRoutingHelper::setRoutePoint ( RoutePoint  pPoint,
const VgEngine::VgPosition &  pPosition 
)
virtual
bool VgMyRoutingHelper::setRoutePoint ( RoutePoint  pPoint,
const VgEngine::VgPosition &  pPosition,
const std::string &  pLayerName 
)

Sets a RoutePoint to a position and layer within the map.

Used when the layername for a given position cannot be deduced from its altitude, for example multiple building's.

Parameters
pPointRoutePoint to set
pPositionPosition to associates with pPoint.
pLayerNamewhere the position is, pPosition.mZOrAltitude should be within the minimum and maximum heights for the layer
Version
2.1.2
Returns
False if the pPosition is not routable.
void VgMyRoutingHelper::setRouteStyle ( VgMyRouteStyler::RouteStyle  pRouteStyle,
bool  pRecomputeRoute = true 
)
void VgMyRoutingHelper::setRouteWidth ( float  pWidth)
void VgMyRoutingHelper::show ( )

Member Data Documentation

const std::string VgMyRoutingHelper::kEndPointStrID
static
const std::string VgMyRoutingHelper::kStartPointStrID
static
VgEngine::VgRefPtr< VgRoutingModule::VgIRouteCallback > VgMyRoutingHelper::mCallback
protected
std::map<VgMyRouteCreator::RoutePoint, VgEngine::VgRefPtr< Vg3DModule::VgPoint > > VgMyRoutingHelper::mHighlightedRoutePoints
protected
VgEngine::VgRefPtr< VgEngine::VgAnimationDescriptor > VgMyRoutingHelper::mHighlightedRoutePointsAnimationDescr
protected
VgEngine::VgInstanceFactory* VgMyRoutingHelper::mInstanceFactory
protected
bool VgMyRoutingHelper::mIsRouteVisible
protected
VgMyLayerAndCameraHandler* VgMyRoutingHelper::mLayerAndCameraHandler
protected
std::vector< LineObject > VgMyRoutingHelper::mLines
protected
std::list< VgEngine::VgRefPtr< Vg3DModule::VgLink > > VgMyRoutingHelper::mLinks
protected
VgMapModule::VgIMapModule* VgMyRoutingHelper::mMapModule
protected
float VgMyRoutingHelper::mObjectHeightOffset
protected
std::vector< PointObject > VgMyRoutingHelper::mPoints
protected
VgRoutingModule::VgIRouteConverter* VgMyRoutingHelper::mRouteConverter2D
protected
POICallbackMap VgMyRoutingHelper::mRoutePoiCallbacks
protected
std::map<VgMyRouteCreator::RoutePoint, VgEngine::VgRefPtr<VgRoutingModule::VgIRoutingNode> > VgMyRoutingHelper::mRoutePoints
protected
VgRoutingModule::VgIRoutingSolver* VgMyRoutingHelper::mRouteSolver
protected
VgMyRouteStyler::RouteStyle VgMyRoutingHelper::mRouteStyle
protected
VgMyRouteStyler VgMyRoutingHelper::mRouteStyler
protected
float VgMyRoutingHelper::mRouteWidth
protected
VgRoutingModule::VgIRoutingModule* VgMyRoutingHelper::mRoutingModule
protected
VgRoutingModule::VgIRouteRequestParameters VgMyRoutingHelper::mRoutingRequestParameters
protected
VgMyTextureLoader* VgMyRoutingHelper::mTextureLoader
protected
VgApplication::VgIApplication* VgMyRoutingHelper::mVgApplication
protected

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