VisioMove-Sample  2.1.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
VgMyLayerAndCameraHandler Class Referenceabstract

Interface for Objects that handle the display of the layers, the camera and their respective animations. More...

Inheritance diagram for VgMyLayerAndCameraHandler:
Inheritance graph

Public Types

enum  eVgViewMode { eVgViewModeGlobal, eVgViewModeBuilding, eVgViewModeFloor }
 View mode used to display a the map. More...
 

Public Member Functions

virtual eVgViewMode getViewMode () const =0
 
virtual const std::string & getFocusedLayerName ()=0
 Gets the focused layer's name. More...
 
virtual unsigned int getCurrentLayerIndex () const =0
 Gets the focused layer's index. More...
 
virtual void gotoViewpoint (const VgEngine::VgIViewPoint &pViewPoint, const std::string &pLayerName, bool pIsAnimated=true)=0
 Moves the camera to a specific view point. More...
 
virtual void gotoLookAtPosition (const VgEngine::VgPosition &pPosition, const std::string &pLayerName, bool pIsAnimated=true)=0
 Moves the camera so that it is focused on a given position. More...
 
virtual void refreshParameters (unsigned int pWidth, unsigned int pHeight)=0
 Refreshes the inner parameters. More...
 
virtual unsigned int getWidth ()=0
 Retrieves the map view's width. More...
 
virtual unsigned int getHeight ()=0
 Retrieves the map view's height. More...
 
virtual bool hasBuilding (const std::string &pBuildingId) const =0
 
virtual void goTo (eVgViewMode pMode, const std::string &pBuilding, const std::string &pFloorName, bool pIsAnimated)=0
 Moves the camera and floors according to a specific visualization mode. More...
 

Detailed Description

Interface for Objects that handle the display of the layers, the camera and their respective animations.

It basically handles 3 layer views : global, building and floor view. A Global View displays multiple layers. A Detailed View displays only one layer.

Member Enumeration Documentation

View mode used to display a the map.

Enumerator
eVgViewModeGlobal 
eVgViewModeBuilding 
eVgViewModeFloor 

Member Function Documentation

virtual unsigned int VgMyLayerAndCameraHandler::getCurrentLayerIndex ( ) const
pure 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.

Returns
The focused layer's index.

Implemented in VgMyBasicApplicationController.

virtual const std::string& VgMyLayerAndCameraHandler::getFocusedLayerName ( )
pure 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.

Returns
The focused layer's name.

Implemented in VgMyBasicApplicationController.

virtual unsigned int VgMyLayerAndCameraHandler::getHeight ( )
pure virtual

Retrieves the map view's height.

Implemented in VgMyBasicApplicationController.

virtual eVgViewMode VgMyLayerAndCameraHandler::getViewMode ( ) const
pure virtual
Returns
the current view mode.

Implemented in VgMyBasicApplicationController.

virtual unsigned int VgMyLayerAndCameraHandler::getWidth ( )
pure virtual

Retrieves the map view's width.

Implemented in VgMyBasicApplicationController.

virtual void VgMyLayerAndCameraHandler::goTo ( eVgViewMode  pMode,
const std::string &  pBuilding,
const std::string &  pFloorName,
bool  pIsAnimated 
)
pure 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.

Parameters
pModeView mode to enable
pBuildingBuilding to go to. (optional if the view mode is global)
pFloorNameFloor to go to. (optional if the view mode is global or building)
pIsAnimatedPass true if you want both Camera and Layers to be animated from their actual position to their target state.

Implemented in VgMyBasicApplicationController.

virtual void VgMyLayerAndCameraHandler::gotoLookAtPosition ( const VgEngine::VgPosition &  pPosition,
const std::string &  pLayerName,
bool  pIsAnimated = true 
)
pure 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.

Note
If the stack is in global view, the camera will not change.
Parameters
pPositionThe position to focus on.
pLayerNameThe name of the layer associated with the position.
pIsAnimatedIf true then animates the transition, otherwise does not.

Implemented in VgMyBasicApplicationController.

virtual void VgMyLayerAndCameraHandler::gotoViewpoint ( const VgEngine::VgIViewPoint &  pViewPoint,
const std::string &  pLayerName,
bool  pIsAnimated = true 
)
pure 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.

Note
If the stack is in global view, the camera will not change.
Parameters
pViewPointThe view point to associate with the camera
pLayerNameThe layer which should be given the focus.
pIsAnimatedIf true then animates the transition, otherwise does not.

Implemented in VgMyBasicApplicationController.

virtual bool VgMyLayerAndCameraHandler::hasBuilding ( const std::string &  pBuildingId) const
pure virtual
Parameters
pBuildingIdThe unique building identifier
Returns
true if the handler has a building with this id. If the map does not support buildings, returns false.

Implemented in VgMyBasicApplicationController.

virtual void VgMyLayerAndCameraHandler::refreshParameters ( unsigned int  pWidth,
unsigned int  pHeight 
)
pure virtual

Refreshes the inner parameters.

Typically, subclasses can use it to recompute their view parameters when the rendering size changes.

Implemented in VgMyBasicApplicationController.


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