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 | addNavigationPositionDisplay (VgMyNavigationPositionDisplay *pDisplay) |
void | addInstructionDisplay (VgMyInstructionDisplay *pDisplay) |
bool | has3DModule () const |
bool | hasMapModule () const |
bool | hasRoutingModule () const |
bool | hasNavigationModule () const |
void | addLayerAndCameraListener (VgMyLayerAndCameraListener *pListener) |
void | deleteRoute () |
bool | setRoutePoint (VgMyRouteCreator::RoutePoint pPoint, const std::string &pPlaceID) |
Sets a RoutePoint to a specific place. | |
bool | setRoutePoint (VgMyRouteCreator::RoutePoint pPoint, const VgEngine::VgPosition pPosition) |
Sets a RoutePoint to a position within the map. | |
void | resetRoutePoint (VgMyRouteCreator::RoutePoint pPoint) |
Resets the place ID associated with a point. | |
bool | isRoutePointSet (VgMyRouteCreator::RoutePoint pPoint) |
void | computeRoute () |
Computes a route. | |
VgRoutingModule::VgIRouteRequestParameters * | editRoutingRequestParameters () |
Returns a reference to the routing request parameters that computeRoute uses. | |
void | resetRoutingRequestParameters () |
Resets the routing request parameters to their initial state. | |
virtual VgEngine::VgRefPtr < VgEngine::VgAnimationDescriptor > | getRoutePointHighlightAnimationDescriptor () |
Returns the descriptor of an animation intended to emphasize routing points. | |
virtual void | setAvoidStairs (bool pDisabledFriendly) |
Sets up the routing request parameters to include/exclude non disabled-friendly attributes. | |
void | layerWillChangeFrom (VgMyLayerAndCameraHandler *pSender, const std::string &pFloorFrom, const std::string &pFloorTo) |
Notification that the layer focus is about to change. | |
void | layerChangedTo (VgMyLayerAndCameraHandler *pSender, const std::string &pFloorFrom, const std::string &pFloorTo) |
Notification that the layer focus did change. | |
void | viewWillChange (VgMyLayerAndCameraHandler *pSender, const bool pDoesChangeFromGlobalToDetailed) |
Notification that the view will change its 'mode' (global or detailed) | |
void | viewDidChange (VgMyLayerAndCameraHandler *pSender, const bool pDoesChangeFromGlobalToDetailed) |
Notification that the view has changed its 'mode' (global or detailed) | |
void | goToInstruction (const unsigned int pInstructionIndex) |
Updates the current instruction. | |
bool | isGlobalView () |
void | switchToGlobalView (bool pIsAnimated=true) |
Switches from the detailledView to the global view. | |
void | switchToDetailedView (bool pIsAnimated=true) |
Switches from the global to the detailled view. | |
const std::string & | getFocusedLayerName () |
Gets the focused layer's name. | |
void | gotoLayer (const std::string &pLayerName, bool pIsAnimated=true) |
Focus a specific layer. | |
void | gotoLayer (const unsigned int pLayerIndex, bool pIsAnimated=true) |
Focus a specific layer. | |
unsigned int | getNumberOfLayers () |
Returns the number of layers. | |
bool | getLayerName (const unsigned int pLayerIndex, std::string &pLayerNameOut) |
Returns the layer name for a given indes. | |
void | gotoViewpoint (const VgEngine::VgIViewPoint &pViewPoint, const std::string &pLayerName, bool pIsAnimated=true) |
Moves the camera to a specific view point. | |
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. | |
void | refreshParameters (unsigned int pWidth, unsigned int pHeight) |
Refreshes the inner parameters. | |
void | notifyRouteComputed (VgRoutingModule::VgRouteRequestStatus pStatus, VgEngine::VgRefPtr< VgRoutingModule::VgIRoute > const &pRoute) |
bool | notifyNavigationComputed (VgNavigationModule::VgNavigationRequestStatus pStatus, VgEngine::VgRefPtr< VgNavigationModule::VgINavigation > const &pNavigation) |
void | notifyPositionUpdated (VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const &pNavigation, const VgEngine::VgPosition &pPosition, double pTime) |
void | notifyNewInstruction (VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const &pNavigation, unsigned int pIndex) |
void | updatePosition (const VgEngine::VgPosition &pPosition) |
Updates the current position. | |
void | clearNavigationPositionDisplays () |
VgEngine::VgRefPtr < VgRoutingModule::VgIRouteCallback > | getRouteCallback () |
Protected Member Functions | |
void | animateToInstruction (VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const &pNavigation, unsigned int pIndex) |
Protected Attributes | |
VgApplication::VgIApplication & | mVgApplication |
VgMyLayerAndCameraHandler * | mLayerAndCameraHandler |
VgMyRouteCreator * | mRouteCreator |
VgMyNavigationCreator * | mNavigationCreator |
std::list < VgMyLayerAndCameraListener * > | mLayerAndCameraListeners |
std::list< VgMyRouteDisplay * > | mRouteDisplays |
std::list < VgMyNavigationPositionDisplay * > | mPositionDisplays |
std::list < VgMyInstructionDisplay * > | mInstructionsDisplays |
VgEngine::VgRefPtr < VgRoutingModule::VgIRoute > | mRoute |
Current Route of NULL if no route request succeed. | |
VgEngine::VgRefPtr < VgNavigationModule::VgINavigation > | mNavigation |
Current Navigation of NULL if no route request succeed. | |
unsigned int | mMaximumInstructionNumber |
VgMyTextureLoader * | mTextureLoader |
VgEngine::VgRefPtr < VgMyBasicRouteCallback > | mRouteCallback |
VgEngine::VgRefPtr < VgMyBasicNavigationCallback > | mNavigationCallback |
VgEngine::VgRefPtr < VgMyBasicNavigationListener > | mNavigationListener |
VgMyBasicApplicationController::VgMyBasicApplicationController | ( | VgApplication::VgIApplication & | pApplication, |
VgMyTextureLoader * | pTextureLoader | ||
) |
virtual VgMyBasicApplicationController::~VgMyBasicApplicationController | ( | ) | [virtual] |
void VgMyBasicApplicationController::addInstructionDisplay | ( | VgMyInstructionDisplay * | pDisplay ) |
void VgMyBasicApplicationController::addLayerAndCameraListener | ( | VgMyLayerAndCameraListener * | pListener ) |
void VgMyBasicApplicationController::addNavigationPositionDisplay | ( | VgMyNavigationPositionDisplay * | pDisplay ) |
void VgMyBasicApplicationController::addRouteDisplay | ( | VgMyRouteDisplay * | pDisplay ) |
void VgMyBasicApplicationController::animateToInstruction | ( | VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const & | pNavigation, |
unsigned int | pIndex | ||
) | [protected] |
void VgMyBasicApplicationController::clearNavigationPositionDisplays | ( | ) |
void VgMyBasicApplicationController::computeRoute | ( | ) | [virtual] |
void VgMyBasicApplicationController::deleteRoute | ( | ) |
VgRoutingModule::VgIRouteRequestParameters* VgMyBasicApplicationController::editRoutingRequestParameters | ( | ) | [virtual] |
Returns a reference to the routing request parameters that computeRoute uses.
Implements VgMyRouteCreator.
const std::string& VgMyBasicApplicationController::getFocusedLayerName | ( | ) | [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.
bool VgMyBasicApplicationController::getLayerName | ( | const unsigned int | pLayerIndex, |
std::string & | pLayerNameOut | ||
) | [virtual] |
Returns the layer name for a given indes.
pLayerIndex | Layer index, should be less than getNumberOfLayers(). |
pLayerNameOut | string to set with layer name. |
Implements VgMyLayerAndCameraHandler.
unsigned int VgMyBasicApplicationController::getNumberOfLayers | ( | ) | [virtual] |
Returns the number of layers.
Implements VgMyLayerAndCameraHandler.
VgEngine::VgRefPtr< VgRoutingModule::VgIRouteCallback > VgMyBasicApplicationController::getRouteCallback | ( | ) | [inline] |
VgMyRouteCreator* VgMyBasicApplicationController::getRouteCreator | ( | ) | const |
virtual VgEngine::VgRefPtr< VgEngine::VgAnimationDescriptor > VgMyBasicApplicationController::getRoutePointHighlightAnimationDescriptor | ( | ) | [virtual] |
Returns the descriptor of an animation intended to emphasize routing points.
Implements VgMyRouteCreator.
void VgMyBasicApplicationController::goToInstruction | ( | const unsigned int | pInstructionIndex ) | [virtual] |
Updates the current instruction.
pInstructionIndex | The new instruction index to use as the current one. |
Implements VgMyInstructionUpdateListener.
void VgMyBasicApplicationController::gotoLayer | ( | const std::string & | pLayerName, |
bool | pIsAnimated = true |
||
) | [virtual] |
Focus a specific layer.
pLayerName | Layer that will be focused. keeps current mode. |
pIsAnimated | If true then animates the transition, otherwise does not. |
Implements VgMyLayerAndCameraHandler.
void VgMyBasicApplicationController::gotoLayer | ( | const unsigned int | pLayerIndex, |
bool | pIsAnimated = true |
||
) | [virtual] |
Focus a specific layer.
pLayerName | Layer index which is associated with the returned list given by VgLayerManager::getLayers(). keeps current mode. |
pIsAnimated | If true then animates the transition, otherwise does not. |
Implements VgMyLayerAndCameraHandler.
void VgMyBasicApplicationController::gotoLookAtPosition | ( | const VgEngine::VgPosition & | pPosition, |
const std::string & | pLayerName, | ||
bool | pIsAnimated = true |
||
) | [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.
void VgMyBasicApplicationController::gotoViewpoint | ( | const VgEngine::VgIViewPoint & | pViewPoint, |
const std::string & | pLayerName, | ||
bool | pIsAnimated = true |
||
) | [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 |
bool VgMyBasicApplicationController::hasMapModule | ( | ) | const |
bool VgMyBasicApplicationController::hasNavigationModule | ( | ) | const |
bool VgMyBasicApplicationController::hasRoutingModule | ( | ) | const |
bool VgMyBasicApplicationController::isGlobalView | ( | ) | [virtual] |
Implements VgMyLayerAndCameraHandler.
bool VgMyBasicApplicationController::isRoutePointSet | ( | VgMyRouteCreator::RoutePoint | pPoint ) | [virtual] |
pPoint | RoutePoint to test. |
Implements VgMyRouteCreator.
void VgMyBasicApplicationController::layerChangedTo | ( | VgMyLayerAndCameraHandler * | pSender, |
const std::string & | pFloorFrom, | ||
const std::string & | pFloorTo | ||
) | [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.
void VgMyBasicApplicationController::layerWillChangeFrom | ( | VgMyLayerAndCameraHandler * | pSender, |
const std::string & | pFloorFrom, | ||
const std::string & | pFloorTo | ||
) | [virtual] |
Notification that the layer focus is about to change.
pSender | |
pLayerFrom | The layer which currently has focus |
pLayerTo | 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 |
||
) |
bool VgMyBasicApplicationController::notifyNavigationComputed | ( | VgNavigationModule::VgNavigationRequestStatus | pStatus, |
VgEngine::VgRefPtr< VgNavigationModule::VgINavigation > const & | pNavigation | ||
) |
void VgMyBasicApplicationController::notifyNewInstruction | ( | VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const & | pNavigation, |
unsigned int | pIndex | ||
) |
void VgMyBasicApplicationController::notifyPositionUpdated | ( | VgEngine::VgConstRefPtr< VgNavigationModule::VgINavigation > const & | pNavigation, |
const VgEngine::VgPosition & | pPosition, | ||
double | pTime | ||
) |
void VgMyBasicApplicationController::notifyRouteComputed | ( | VgRoutingModule::VgRouteRequestStatus | pStatus, |
VgEngine::VgRefPtr< VgRoutingModule::VgIRoute > const & | pRoute | ||
) |
void VgMyBasicApplicationController::refreshParameters | ( | unsigned int | pWidth, |
unsigned int | pHeight | ||
) | [virtual] |
Refreshes the inner parameters.
Typically, subclasses can use it to recompute their view parameters when the rendering size changes.
Implements VgMyLayerAndCameraHandler.
void VgMyBasicApplicationController::resetRoutePoint | ( | VgMyRouteCreator::RoutePoint | pPoint ) | [virtual] |
Resets the place ID associated with a point.
pPoint | RoutePoint to reset. |
Implements VgMyRouteCreator.
void VgMyBasicApplicationController::resetRoutingRequestParameters | ( | ) | [virtual] |
Resets the routing request parameters to their initial state.
Implements VgMyRouteCreator.
virtual void VgMyBasicApplicationController::setAvoidStairs | ( | bool | pDisabledFriendly ) | [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 ) |
bool VgMyBasicApplicationController::setRoutePoint | ( | VgMyRouteCreator::RoutePoint | pPoint, |
const std::string & | pPlaceID | ||
) | [virtual] |
Sets a RoutePoint to a specific place.
pPoint | RoutePoint to set |
pPlaceID | Place to associates with pPoint. |
Implements VgMyRouteCreator.
bool VgMyBasicApplicationController::setRoutePoint | ( | VgMyRouteCreator::RoutePoint | pPoint, |
const VgEngine::VgPosition | pPosition | ||
) | [virtual] |
Sets a RoutePoint to a position within the map.
Finds the closest routing node from the routing network to the given position.
... 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; ...
pPoint | RoutePoint to set |
pPosition | Position to associates with pPoint. |
Implements VgMyRouteCreator.
void VgMyBasicApplicationController::switchToDetailedView | ( | bool | pIsAnimated = true ) |
[virtual] |
Switches from the global to the detailled view.
Do nothing if alrady in detailled view.
pIsAnimated | If true then animates the transition, otherwise does not. |
Implements VgMyLayerAndCameraHandler.
void VgMyBasicApplicationController::switchToGlobalView | ( | bool | pIsAnimated = true ) |
[virtual] |
Switches from the detailledView to the global view.
Do nothing if already in global view.
pIsAnimated | If true then animates the transition, otherwise does not. |
Implements VgMyLayerAndCameraHandler.
void VgMyBasicApplicationController::unloadConfiguration | ( | ) |
void VgMyBasicApplicationController::updatePosition | ( | const VgEngine::VgPosition & | pPosition ) | [virtual] |
Updates the current position.
pPosition | A position representing a provided location |
Implements VgMyLocationListener.
void VgMyBasicApplicationController::viewDidChange | ( | VgMyLayerAndCameraHandler * | pSender, |
const bool | pDoesChangeFromGlobalToDetailed | ||
) | [virtual] |
Notification that the view has changed its 'mode' (global or detailed)
pSender | |
pDoesChangeFromGlobalToDetailed | True if the view switch to global view, False if it switches to the detailed view. |
Implements VgMyLayerAndCameraListener.
void VgMyBasicApplicationController::viewWillChange | ( | VgMyLayerAndCameraHandler * | pSender, |
const bool | pDoesChangeFromGlobalToDetailed | ||
) | [virtual] |
Notification that the view will change its 'mode' (global or detailed)
pSender | |
pDoesChangeFromGlobalToDetailed | True if the view switch to global view, False if it switches to the detailed view. |
Implements VgMyLayerAndCameraListener.
std::list<VgMyInstructionDisplay*> VgMyBasicApplicationController::mInstructionsDisplays [protected] |
std::list<VgMyLayerAndCameraListener*> VgMyBasicApplicationController::mLayerAndCameraListeners [protected] |
unsigned int VgMyBasicApplicationController::mMaximumInstructionNumber [protected] |
VgEngine::VgRefPtr< VgNavigationModule::VgINavigation > VgMyBasicApplicationController::mNavigation [protected] |
Current Navigation of NULL if no route request succeed.
VgEngine::VgRefPtr< VgMyBasicNavigationCallback > VgMyBasicApplicationController::mNavigationCallback [protected] |
VgEngine::VgRefPtr< VgMyBasicNavigationListener > VgMyBasicApplicationController::mNavigationListener [protected] |
std::list<VgMyNavigationPositionDisplay*> VgMyBasicApplicationController::mPositionDisplays [protected] |
VgEngine::VgRefPtr< VgRoutingModule::VgIRoute > VgMyBasicApplicationController::mRoute [protected] |
Current Route of NULL if no route request succeed.
VgEngine::VgRefPtr< VgMyBasicRouteCallback > VgMyBasicApplicationController::mRouteCallback [protected] |
std::list<VgMyRouteDisplay*> VgMyBasicApplicationController::mRouteDisplays [protected] |
VgApplication::VgIApplication& VgMyBasicApplicationController::mVgApplication [protected] |