VisioMove-Sample  2.1.3
 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 Member Functions

virtual bool isGlobalView ()=0
 
virtual void switchToGlobalView (bool pIsAnimated=true)=0
 Switches from the detailledView to the global view. More...
 
virtual void switchToDetailedView (bool pIsAnimated=true)=0
 Switches from the global to the detailled view. More...
 
virtual const std::string & getFocusedLayerName ()=0
 Gets the focused layer's name. More...
 
virtual void gotoLayer (const std::string &pLayerName, bool pIsAnimated=true)=0
 Focus a specific layer. More...
 
virtual void gotoLayer (const unsigned int pLayerIndex, bool pIsAnimated=true)=0
 Focus a specific layer. More...
 
virtual unsigned int getNumberOfLayers ()=0
 Returns the number of layers. More...
 
virtual bool getLayerName (const unsigned int pLayerIndex, std::string &pLayerNameOut)=0
 Returns the layer name for a given indes. 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...
 

Detailed Description

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

It basically handles two layer layout : global and detailed view. A Global View displays multiple layers. A Detailed View displays only one layer.

Member Function Documentation

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 VgMyStackedLayerAndCameraHandler.

virtual unsigned int VgMyLayerAndCameraHandler::getHeight ( )
pure virtual

Retrieves the map view's height.

Implemented in VgMyStackedLayerAndCameraHandler.

virtual bool VgMyLayerAndCameraHandler::getLayerName ( const unsigned int  pLayerIndex,
std::string &  pLayerNameOut 
)
pure virtual

Returns the layer name for a given indes.

Parameters
pLayerIndexLayer index, should be less than getNumberOfLayers().
pLayerNameOutstring to set with layer name.
Returns
true if name was set, false if pLayerIndex is greater or equal to getNumberOfLayers().

Implemented in VgMyStackedLayerAndCameraHandler.

virtual unsigned int VgMyLayerAndCameraHandler::getNumberOfLayers ( )
pure virtual

Returns the number of layers.

Implemented in VgMyStackedLayerAndCameraHandler.

virtual unsigned int VgMyLayerAndCameraHandler::getWidth ( )
pure virtual

Retrieves the map view's width.

Implemented in VgMyStackedLayerAndCameraHandler.

virtual void VgMyLayerAndCameraHandler::gotoLayer ( const std::string &  pLayerName,
bool  pIsAnimated = true 
)
pure virtual

Focus a specific layer.

Parameters
pLayerNameLayer that will be focused. keeps current mode.
pIsAnimatedIf true then animates the transition, otherwise does not.

Implemented in VgMyStackedLayerAndCameraHandler.

virtual void VgMyLayerAndCameraHandler::gotoLayer ( const unsigned int  pLayerIndex,
bool  pIsAnimated = true 
)
pure virtual

Focus a specific layer.

Parameters
pLayerIndexLayer index which is associated with the returned list given by VgLayerManager::getLayers(). keeps current mode.
pIsAnimatedIf true then animates the transition, otherwise does not.

Implemented in VgMyStackedLayerAndCameraHandler.

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 VgMyStackedLayerAndCameraHandler.

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 VgMyStackedLayerAndCameraHandler.

virtual bool VgMyLayerAndCameraHandler::isGlobalView ( )
pure virtual
Returns
TRUE if the Handler displays the global view. FALSE if displaying the detailed view.

Implemented in VgMyStackedLayerAndCameraHandler.

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 VgMyStackedLayerAndCameraHandler.

virtual void VgMyLayerAndCameraHandler::switchToDetailedView ( bool  pIsAnimated = true)
pure virtual

Switches from the global to the detailled view.

Do nothing if alrady in detailled view.

Parameters
pIsAnimatedIf true then animates the transition, otherwise does not.

Implemented in VgMyStackedLayerAndCameraHandler.

virtual void VgMyLayerAndCameraHandler::switchToGlobalView ( bool  pIsAnimated = true)
pure virtual

Switches from the detailledView to the global view.

Do nothing if already in global view.

Parameters
pIsAnimatedIf true then animates the transition, otherwise does not.

Implemented in VgMyStackedLayerAndCameraHandler.


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