VisioMove-Sample
2.1.5
|
Implements a basic logic to handle the map display & behaviour. More...
Public Member Functions | |
VgMyBasicApplicationController (VgApplication::VgIApplication &pApplication, VgMyTextureLoader *pTextureLoader) | |
virtual | ~VgMyBasicApplicationController () |
bool | loadConfiguration (const std::string &pConfiguration, const unsigned int pSecretKey, const std::string &pLicenseURL, const int pDataset=0) |
void | unloadConfiguration () |
void | setLayerAndCameraHandler (VgMyLayerAndCameraHandler *pHandler) |
void | setRouteCreator (VgMyRouteCreator *pCreator) |
VgMyRouteCreator * | getRouteCreator () const |
void | addRouteDisplay (VgMyRouteDisplay *pDisplay) |
void | setNavigationCreator (VgMyNavigationCreator *pCreator) |
void | addInstructionDisplay (VgMyInstructionDisplay *pDisplay) |
void | removeInstructionDisplay (VgMyInstructionDisplay *pDisplay) |
void | addNavigationListener (VgMyNavigationListener *pListener) |
Add navigation listener in order to receive navigation related notifications. More... | |
void | removeNavigationListener (VgMyNavigationListener *pListener) |
Add navigation listener in order to receive navigation related notifications. More... | |
bool | has3DModule () const |
bool | hasMapModule () const |
bool | hasRoutingModule () const |
bool | hasNavigationModule () const |
void | addLayerAndCameraListener (VgMyLayerAndCameraListener *pListener) |
void | removeLayerAndCameraListener (VgMyLayerAndCameraListener *pListener) |
void | deleteRoute () |
bool | setRoutePoint (VgMyRouteCreator::RoutePoint pPoint, const std::string &pPlaceID) |
Implementation of interface : VgMyRouteCreator. More... | |
bool | setRoutePoint (VgMyRouteCreator::RoutePoint pPoint, const VgEngine::VgPosition &pPosition) |
Sets a RoutePoint to a position within the map. More... | |
void | resetRoutePoint (VgMyRouteCreator::RoutePoint pPoint) |
Resets the place ID associated with a point. More... | |
bool | isRoutePointSet (VgMyRouteCreator::RoutePoint pPoint) |
void | computeRoute () |
Computes a route. More... | |
VgRoutingModule::VgIRouteRequestParameters * | editRoutingRequestParameters () |
Returns a reference to the routing request parameters that computeRoute uses. More... | |
void | resetRoutingRequestParameters () |
Resets the routing request parameters to their initial state. More... | |
VgRoutingModule::VgIRoutingNodeParameters * | editRoutingNodeParameters () |
Returns a reference to the routing node parameters that getRoutingNode for a position uses. More... | |
void | resetRoutingNodeParameters () |
Resets the routing node parameters to their initial state. More... | |
VgEngine::VgRefPtr < VgEngine::VgAnimationDescriptor > | getRoutePointHighlightAnimationDescriptor () |
Returns the descriptor of an animation intended to emphasize routing points. More... | |
void | setAvoidStairs (bool pDisabledFriendly) |
Sets up the routing request parameters to include/exclude non disabled-friendly attributes. More... | |
void | setRouteWidth (float pWidth) |
Determines the width of the created route. More... | |
float | getRouteWidth () |
Returns the current width of the created route. More... | |
void | setRouteMarkerHeight (float pHeight) |
Set route marker height. More... | |
void | layerWillChangeFrom (VgMyLayerAndCameraHandler *pSender, const std::string &pFloorFrom, const std::string &pFloorTo) |
Notification that the layer focus is about to change. More... | |
void | layerChangedTo (VgMyLayerAndCameraHandler *pSender, const std::string &pFloorFrom, const std::string &pFloorTo) |
Notification that the layer focus did change. More... | |
void | modeWillChange (VgMyLayerAndCameraHandler *pSender, VgMyLayerAndCameraHandler::eVgViewMode pTargetMode) |
Notification that the mode will change. More... | |
void | modeDidChange (VgMyLayerAndCameraHandler *pSender, VgMyLayerAndCameraHandler::eVgViewMode pTargetMode) |
Notification that the mode has changed. More... | |
eVgViewMode | getViewMode () const |
const std::string & | getFocusedLayerName () |
Gets the focused layer's name. More... | |
void | gotoViewpoint (const VgEngine::VgIViewPoint &pViewPoint, const std::string &pLayerName, bool pIsAnimated=true) |
Moves the camera to a specific view point. More... | |
void | gotoLookAtPosition (const VgEngine::VgPosition &pPosition, const std::string &pLayerName, bool pIsAnimated=true) |
Moves the camera so that it is focused on a given position. More... | |
void | refreshParameters (unsigned int pWidth, unsigned int pHeight) |
Refreshes the inner parameters. More... | |
unsigned int | getWidth () |
Retrieves the map view's width. More... | |
unsigned int | getHeight () |
Retrieves the map view's height. More... | |
unsigned int | getCurrentLayerIndex () const |
Gets the focused layer's index. More... | |
bool | hasBuilding (const std::string &pBuildingId) const |
void | goTo (eVgViewMode pMode, const std::string &pBuilding, const std::string &pFloorName, bool pIsAnimated) |
Moves the camera and floors according to a specific visualization mode. More... | |
virtual void | notifyRouteComputed (VgRoutingModule::VgRouteRequestStatus pStatus, VgEngine::VgRefPtr< VgRoutingModule::VgIRoute > const &pRoute) |
virtual bool | notifyNavigationComputed (VgNavigationModule::VgNavigationRequestStatus pStatus, VgEngine::VgRefPtr< VgNavigationModule::VgINavigation > const &pNavigation) |
virtual void | notifyPositionUpdated (VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const &pNavigation, const VgEngine::VgPosition &pPosition, double pTime) |
virtual void | notifyNewInstruction (VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const &pNavigation, unsigned int pIndex) |
virtual void | notifyPositionDidChange (const std::string &pProvider, const VgEngine::VgPosition &pPosition) |
Called when the location has changed. More... | |
virtual void | notifyFloorDidChange (const std::string &pProvider, const std::string &pFloor) |
Called when the floor has changed. More... | |
virtual void | notifyAccuracyDidChange (const std::string &pProvider, double pAccuracy) |
Called when the accuracy has changed. More... | |
virtual void | notifyContextDidChange (const std::string &pProvider, int pContext) |
Called when the context has changed. More... | |
virtual void | notifyHeadingDidChange (const std::string &pProvider, double pHeading) |
Called when the heading has changed. More... | |
virtual void | notifyStatusDidChange (const std::string &pProvider, int pStatus) |
Called when the status has changed. More... | |
virtual void | notifyLocationProviderEnabled (const std::string &pProvider) |
Called when the provider is enabled. More... | |
virtual void | notifyLocationProviderDisabled (const std::string &pProvider) |
Called when the provider is disabled. More... | |
VgEngine::VgRefPtr < VgRoutingModule::VgIRouteCallback > | getRouteCallback () |
void | setRouteStyle (VgMyRouteStyler::RouteStyle pRouteStyle, bool pRecomputeRoute=true) |
Change the routing style of lines generated by the routing helper. More... | |
VgMyRouteStyler::RouteStyle | getRouteStyle () const |
get the current route style More... | |
void | goToInstruction (const unsigned int pInstructionIndex) |
Protected Member Functions | |
void | animateToInstruction (VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const &pNavigation, unsigned int pIndex) |
![]() | |
virtual | ~VgMyLocationListener () |
Additional Inherited Members | |
![]() | |
enum | eVgViewMode { eVgViewModeGlobal, eVgViewModeBuilding, eVgViewModeFloor } |
View mode used to display a the map. More... | |
![]() | |
enum | RoutePoint { eStart, eStop0, eStop1, eStop2, eStop3, eStop4, eStop5, eStopMax = 7, eEnd } |
The points that a route may have. More... | |
Implements a basic logic to handle the map display & behaviour.
This helper class eases the common operations onto maps. Customize it at will to fit your own application.
This controller inherits from main listeners to act as a dispatcher. All objects related to the map management should somehow be registred to this controller.
VgMyBasicApplicationController::VgMyBasicApplicationController | ( | VgApplication::VgIApplication & | pApplication, |
VgMyTextureLoader * | pTextureLoader | ||
) |
|
virtual |
void VgMyBasicApplicationController::addInstructionDisplay | ( | VgMyInstructionDisplay * | pDisplay | ) |
void VgMyBasicApplicationController::addLayerAndCameraListener | ( | VgMyLayerAndCameraListener * | pListener | ) |
void VgMyBasicApplicationController::addNavigationListener | ( | VgMyNavigationListener * | pListener | ) |
Add navigation listener in order to receive navigation related notifications.
pListener | Navigation listener to receive |
void VgMyBasicApplicationController::addRouteDisplay | ( | VgMyRouteDisplay * | pDisplay | ) |
|
protected |
|
virtual |
Computes a route.
Implements VgMyRouteCreator.
void VgMyBasicApplicationController::deleteRoute | ( | ) |
|
virtual |
Returns a reference to the routing node parameters that getRoutingNode for a position uses.
Used for special configurations, for example you may want to use eRoutingNodeOptionsOnEdge and exclude the modality "shuttle" on edges.
Implements VgMyRouteCreator.
|
virtual |
Returns a reference to the routing request parameters that computeRoute uses.
Implements VgMyRouteCreator.
|
virtual |
Gets the focused layer's index.
The "focused" layer is the one that is displayed in the detailled view. if the global view is displayed, the focused layer should be the most visible one.
Implements VgMyLayerAndCameraHandler.
|
virtual |
Gets the focused layer's name.
The "focused" layer is the one that is displayed in the detailled view. if the global view is displayed, the focused layer should be the most visible one.
Implements VgMyLayerAndCameraHandler.
|
virtual |
Retrieves the map view's height.
Implements VgMyLayerAndCameraHandler.
|
inline |
References mRouteCallback.
VgMyRouteCreator* VgMyBasicApplicationController::getRouteCreator | ( | ) | const |
|
virtual |
Returns the descriptor of an animation intended to emphasize routing points.
Implements VgMyRouteCreator.
|
virtual |
|
virtual |
Returns the current width of the created route.
Implements VgMyRouteCreator.
|
virtual |
Implements VgMyLayerAndCameraHandler.
|
virtual |
Retrieves the map view's width.
Implements VgMyLayerAndCameraHandler.
|
virtual |
Moves the camera and floors according to a specific visualization mode.
When passing Global view mode, both building and floor values are ignored When passing Building view mode, the floor name is optional. If not specified, it will display the given building's ground floor. When passing Floor view mode, pBuilding should contains the given floor. If it is not the case, the ground floor of the given vuilding will be displaed instead.
pMode | View mode to enable |
pBuilding | Building to go to. (optional if the view mode is global) |
pFloorName | Floor to go to. (optional if the view mode is global or building) |
pIsAnimated | Pass true if you want both Camera and Layers to be animated from their actual position to their target state. |
Implements VgMyLayerAndCameraHandler.
void VgMyBasicApplicationController::goToInstruction | ( | const unsigned int | pInstructionIndex | ) |
|
virtual |
Moves the camera so that it is focused on a given position.
The camera's view, heading, pitch are always conserved. The altitude of pPosition is automatically set to zero.
If the pLayerName isn't the currently focused layer, then before any camera movement is invoked, pLayerName becomes the focused layer.
pPosition | The position to focus on. |
pLayerName | The name of the layer associated with the position. |
pIsAnimated | If true then animates the transition, otherwise does not. |
Implements VgMyLayerAndCameraHandler.
|
virtual |
Moves the camera to a specific view point.
If the pLayerName isn't the currently focused layer, then before any camera movement is invoked, pLayerName becomes the focused layer.
pViewPoint | The view point to associate with the camera |
pLayerName | The layer which should be given the focus. |
pIsAnimated | If true then animates the transition, otherwise does not. |
Implements VgMyLayerAndCameraHandler.
bool VgMyBasicApplicationController::has3DModule | ( | ) | const |
|
virtual |
pBuildingId | The unique building identifier |
Implements VgMyLayerAndCameraHandler.
bool VgMyBasicApplicationController::hasMapModule | ( | ) | const |
bool VgMyBasicApplicationController::hasNavigationModule | ( | ) | const |
bool VgMyBasicApplicationController::hasRoutingModule | ( | ) | const |
|
virtual |
pPoint | RoutePoint to test. |
Implements VgMyRouteCreator.
|
virtual |
Notification that the layer focus did change.
pSender | |
pFloorFrom | The layer which previously had the focus. |
pFloorTo | The layer which currently has the focus. |
Implements VgMyLayerAndCameraListener.
|
virtual |
Notification that the layer focus is about to change.
pSender | |
pFloorFrom | The layer which currently has focus |
pFloorTo | The layer which will soon have the focus |
Implements VgMyLayerAndCameraListener.
bool VgMyBasicApplicationController::loadConfiguration | ( | const std::string & | pConfiguration, |
const unsigned int | pSecretKey, | ||
const std::string & | pLicenseURL, | ||
const int | pDataset = 0 |
||
) |
|
virtual |
Notification that the mode has changed.
pSender | |
pTargetMode | The mode which which is currently active. |
Implements VgMyLayerAndCameraListener.
|
virtual |
Notification that the mode will change.
pSender | |
pTargetMode | The mode which will soon be activated. |
Implements VgMyLayerAndCameraListener.
|
virtual |
Called when the accuracy has changed.
pProvider | The location provider responsible for sending the notification. |
pAccuracy | The new accuracy |
Implements VgMyLocationListener.
|
virtual |
Called when the context has changed.
pProvider | The location provider responsible for sending the notification. |
pContext | The new context |
Implements VgMyLocationListener.
|
virtual |
Called when the floor has changed.
pProvider | The location provider responsible for sending the notification. |
pFloor | The new floor |
Implements VgMyLocationListener.
|
virtual |
Called when the heading has changed.
Heading is the horizontal direction of travel of this device, and is not related to the device orientation.
pProvider | The location provider responsible for sending the notification. |
pHeading | The new heading. The valid range for the heading is [0.0, 360.0]. Where 0.0 is North, and increasing values starts towards the East. |
Implements VgMyLocationListener.
|
virtual |
Called when the provider is disabled.
pProvider | The location provider responsible for sending the notification. |
Implements VgMyLocationListener.
|
virtual |
Called when the provider is enabled.
pProvider | The location provider responsible for sending the notification. |
Implements VgMyLocationListener.
|
virtual |
|
virtual |
|
virtual |
Called when the location has changed.
pProvider | The location provider responsible for sending the notification |
pPosition | The new position |
Implements VgMyLocationListener.
|
virtual |
|
virtual |
|
virtual |
Called when the status has changed.
pProvider | The location provider responsible for sending the notification. |
pStatus | The new status. |
Implements VgMyLocationListener.
|
virtual |
Refreshes the inner parameters.
Typically, subclasses can use it to recompute their view parameters when the rendering size changes.
Implements VgMyLayerAndCameraHandler.
void VgMyBasicApplicationController::removeInstructionDisplay | ( | VgMyInstructionDisplay * | pDisplay | ) |
void VgMyBasicApplicationController::removeLayerAndCameraListener | ( | VgMyLayerAndCameraListener * | pListener | ) |
void VgMyBasicApplicationController::removeNavigationListener | ( | VgMyNavigationListener * | pListener | ) |
Add navigation listener in order to receive navigation related notifications.
pListener | Navigation listener to receive |
|
virtual |
Resets the place ID associated with a point.
pPoint | RoutePoint to reset. |
Implements VgMyRouteCreator.
|
virtual |
Resets the routing node parameters to their initial state.
Implements VgMyRouteCreator.
|
virtual |
Resets the routing request parameters to their initial state.
Implements VgMyRouteCreator.
|
virtual |
Sets up the routing request parameters to include/exclude non disabled-friendly attributes.
pDisabledFriendly | True if disabled friendly routing is wanted, false if not |
Implements VgMyRouteCreator.
void VgMyBasicApplicationController::setLayerAndCameraHandler | ( | VgMyLayerAndCameraHandler * | pHandler | ) |
void VgMyBasicApplicationController::setNavigationCreator | ( | VgMyNavigationCreator * | pCreator | ) |
void VgMyBasicApplicationController::setRouteCreator | ( | VgMyRouteCreator * | pCreator | ) |
|
virtual |
Set route marker height.
Adjust so that the marker appears to be anchored to the top of desired surface.
pHeight | The height of the route markers in meters. |
Implements VgMyRouteCreator.
|
virtual |
Implementation of interface : VgMyRouteCreator.
Implements VgMyRouteCreator.
|
virtual |
Sets a RoutePoint to a position within the map.
Finds the closest routing node from the routing network to the given position.
pPoint | RoutePoint to set |
pPosition | Position to associates with pPoint. |
Implements VgMyRouteCreator.
|
virtual |
Change the routing style of lines generated by the routing helper.
pRouteStyle | route style |
pRecomputeRoute |
Implements VgMyRouteCreator.
|
virtual |
Determines the width of the created route.
pWidth | The width of the route in meters |
Implements VgMyRouteCreator.
void VgMyBasicApplicationController::unloadConfiguration | ( | ) |
|
protected |
Used in conjuction with a position provider.
Records the last received floor change notification.
|
protected |
Current physical position.
Note the altitude is relative to the ground, and not the current floor. So from this position it's possible to determine the floor.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Current Navigation of NULL if no route request succeed.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Current Route of NULL if no route request succeed.
|
protected |
Referenced by getRouteCallback().
|
protected |
|
protected |
|
protected |
|
protected |