Interface for Objects that handle the display of the layers, the camera and their respective animations. More...
Public Member Functions | |
virtual bool | isGlobalView ()=0 |
virtual void | switchToGlobalView (bool pIsAnimated=true)=0 |
Switches from the detailledView to the global view. | |
virtual void | switchToDetailedView (bool pIsAnimated=true)=0 |
Switches from the global to the detailled view. | |
virtual const std::string & | getFocusedLayerName ()=0 |
Gets the focused layer's name. | |
virtual void | gotoLayer (const std::string &pLayerName, bool pIsAnimated=true)=0 |
Focus a specific layer. | |
virtual void | gotoLayer (const unsigned int pLayerIndex, bool pIsAnimated=true)=0 |
Focus a specific layer. | |
virtual unsigned int | getNumberOfLayers ()=0 |
Returns the number of layers. | |
virtual bool | getLayerName (const unsigned int pLayerIndex, std::string &pLayerNameOut)=0 |
Returns the layer name for a given indes. | |
virtual void | gotoViewpoint (const VgEngine::VgIViewPoint &pViewPoint, const std::string &pLayerName, bool pIsAnimated=true)=0 |
Moves the camera to a specific view point. | |
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. | |
virtual void | refreshParameters (unsigned int pWidth, unsigned int pHeight)=0 |
Refreshes the inner parameters. |
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.
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.
Implemented in VgMyBasicApplicationController, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.
virtual bool VgMyLayerAndCameraHandler::getLayerName | ( | const unsigned int | pLayerIndex, |
std::string & | pLayerNameOut | ||
) | [pure virtual] |
Returns the layer name for a given indes.
pLayerIndex | Layer index, should be less than getNumberOfLayers(). |
pLayerNameOut | string to set with layer name. |
Implemented in VgMyBasicApplicationController, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.
virtual unsigned int VgMyLayerAndCameraHandler::getNumberOfLayers | ( | ) | [pure virtual] |
Returns the number of layers.
Implemented in VgMyBasicApplicationController, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.
virtual void VgMyLayerAndCameraHandler::gotoLayer | ( | const std::string & | pLayerName, |
bool | pIsAnimated = true |
||
) | [pure virtual] |
Focus a specific layer.
pLayerName | Layer that will be focused. keeps current mode. |
pIsAnimated | If true then animates the transition, otherwise does not. |
Implemented in VgMyBasicApplicationController, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.
virtual void VgMyLayerAndCameraHandler::gotoLayer | ( | const unsigned int | pLayerIndex, |
bool | pIsAnimated = true |
||
) | [pure 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. |
Implemented in VgMyBasicApplicationController, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.
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.
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. |
Implemented in VgMyBasicApplicationController, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.
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.
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. |
Implemented in VgMyBasicApplicationController, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.
virtual bool VgMyLayerAndCameraHandler::isGlobalView | ( | ) | [pure virtual] |
Implemented in VgMyBasicApplicationController, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.
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, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.
virtual void VgMyLayerAndCameraHandler::switchToDetailedView | ( | bool | pIsAnimated = true ) |
[pure 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. |
Implemented in VgMyBasicApplicationController, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.
virtual void VgMyLayerAndCameraHandler::switchToGlobalView | ( | bool | pIsAnimated = true ) |
[pure 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. |
Implemented in VgMyBasicApplicationController, VgMyStackedLayerAndCameraHandler, and VgMyStackedLayerAndCameraHandlerOldWithPinch.