VisioDevKit-Sample
v2.0
|
Public Member Functions | |
VgMyStackedLayerAndCameraHandlerOldWithPinch (VgApplication::VgIApplication *pVgApplication, VgMyLayerAndCameraListener *pListener, unsigned int pViewWidthInPixels, unsigned int pViewHeightInPixels) | |
virtual | ~VgMyStackedLayerAndCameraHandlerOldWithPinch () |
bool | isGlobalView () |
void | switchToGlobalView (bool pIsAnimated=true) |
Switches from the detailledView to the global view. More... | |
void | switchToDetailedView (bool pIsAnimated=true) |
Switches from the global to the detailled view. More... | |
const std::string & | getFocusedLayerName () |
Gets the focused layer's name. More... | |
void | gotoLayer (const std::string &pLayerName, bool pIsAnimated=true) |
Focus a specific layer. More... | |
unsigned int | getNumberOfLayers () |
Returns the number of layers. More... | |
bool | getLayerName (const unsigned int pLayerIndex, std::string &pLayerNameOut) |
Returns the layer name for a given indes. More... | |
void | gotoLayer (const unsigned int pLayerIndex, bool pIsAnimated=true) |
Focus a specific layer. 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 | getCurrentLayerIndex () const |
VgEngine::VgPosition * | getCameraPosition () |
void | onLayerSelected () |
void | onSelectorReady () |
void | animateCameraToViewPoint (const VgEngine::VgIViewPoint &pViewPoint, float pDuration, bool pIsAnimated) |
void | animateLayersFromCloseToStackView (bool pFromCloseToStackView, float pDuration, bool pIsAnimated) |
VgEngine::VgPosition | getPositionForLayerInGlobalView (unsigned int pLayerIndex, unsigned int pFocusedLayer) |
Gets the position for a layer when in global view. More... | |
VgEngine::VgPosition | getPositionForLayerInDetailedView (unsigned int pLayerIndex, unsigned int pFocusedLayer) |
Gets the position for a layer when in detailed view. More... | |
void | animateLayerToPosition (VgEngine::VgRefPtr< VgEngine::VgLayer >const &lLayer, const VgEngine::VgPosition &pStartPos, const VgEngine::VgPosition &pEndPos, VgEngine::VgRefPtr< VgEngine::VgIAnimationCallback >const &pCallback, float pDuration) |
VgEngine::VgIViewPoint & | getStackViewPoint () |
void | setStackCenterPosition (const VgEngine::VgPosition &pCenter) |
const VgEngine::VgPosition & | getStackCenter () |
Get the stack center. More... | |
void | refreshStackView () |
void | setParam (const VgMyConfigurableParam pParam, const double pDouble) |
Allows application to customise the look and feel of the VgMyStackedLayerAndCameraHandlerOldWithPinch. More... | |
double | getParam (const VgMyConfigurableParam pParam) |
Retrieve a parameter value. More... | |
void | updateManipulatorForGlobalView (bool pIsGlobalView) |
Updates the manipulator, according to the stack state. More... | |
Protected Member Functions | |
VgEngine::VgRefPtr < VgEngine::VgIAnimationCallback > | registerCallback (VgEngine::VgRefPtr< VgEngine::VgIAnimationCallback > pCallback, unsigned int pLayerIndex) |
void | setDefaultStackParams () |
void | calculateDynamicStackParams () |
void | gotoLayerInGlobalView (const unsigned int pLayerIndex, bool pIsAnimated) |
void | gotoLayerInDetailedView (const unsigned int pLayerIndex, bool pIsAnimated) |
Protected Attributes | |
VgApplication::VgIApplication * | mVgApplication |
VgMyLayerAndCameraListener * | mLayerUpdateListener |
unsigned int | mCurrentLayerIndex |
unsigned int | mPreviousLayerIndex |
bool | mIsLayerStackDisplayed |
bool | mIsViewModeInitialized |
VgEngine::VgIViewPoint | mCamStartViewPoint |
double | mParam [eMaxDoubleParams] |
VgEngine::VgPosition | mStackCenter |
VgEngine::VgIViewPoint | mCameraGlobalViewPoint |
VgEngine::VgRefPtr < VgMyFloorSelectorTrigger > | mPostDrawCallback |
VgEngine::VgRefPtr < VgEngine::VgIAnimationCallback > | mCameraCallback |
std::vector < VgEngine::VgRefPtr < VgEngine::VgIAnimationCallback > > | mLayersCallback |
VgEngine::VgRefPtr < FloorSelectorManipulator > | mManipulatorListener |
std::hash_map< std::string, float > | mLODsFactors |
std::hash_map< std::string, float > | mLoadFactors |
typedef enum VgMyStackedLayerAndCameraHandlerOldWithPinch::VgMyConfigurableParam VgMyStackedLayerAndCameraHandlerOldWithPinch::VgMyConfigurableParam |
VgMyStackedLayerAndCameraHandlerOldWithPinch::VgMyStackedLayerAndCameraHandlerOldWithPinch | ( | VgApplication::VgIApplication * | pVgApplication, |
VgMyLayerAndCameraListener * | pListener, | ||
unsigned int | pViewWidthInPixels, | ||
unsigned int | pViewHeightInPixels | ||
) |
|
virtual |
void VgMyStackedLayerAndCameraHandlerOldWithPinch::animateCameraToViewPoint | ( | const VgEngine::VgIViewPoint & | pViewPoint, |
float | pDuration, | ||
bool | pIsAnimated | ||
) |
void VgMyStackedLayerAndCameraHandlerOldWithPinch::animateLayersFromCloseToStackView | ( | bool | pFromCloseToStackView, |
float | pDuration, | ||
bool | pIsAnimated | ||
) |
void VgMyStackedLayerAndCameraHandlerOldWithPinch::animateLayerToPosition | ( | VgEngine::VgRefPtr< VgEngine::VgLayer >const & | lLayer, |
const VgEngine::VgPosition & | pStartPos, | ||
const VgEngine::VgPosition & | pEndPos, | ||
VgEngine::VgRefPtr< VgEngine::VgIAnimationCallback >const & | pCallback, | ||
float | pDuration | ||
) |
|
protected |
VgEngine::VgPosition* VgMyStackedLayerAndCameraHandlerOldWithPinch::getCameraPosition | ( | ) |
unsigned int VgMyStackedLayerAndCameraHandlerOldWithPinch::getCurrentLayerIndex | ( | ) | const |
|
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 |
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.
|
virtual |
Returns the number of layers.
Implements VgMyLayerAndCameraHandler.
double VgMyStackedLayerAndCameraHandlerOldWithPinch::getParam | ( | const VgMyConfigurableParam | pParam | ) |
Retrieve a parameter value.
VgEngine::VgPosition VgMyStackedLayerAndCameraHandlerOldWithPinch::getPositionForLayerInDetailedView | ( | unsigned int | pLayerIndex, |
unsigned int | pFocusedLayer | ||
) |
Gets the position for a layer when in detailed view.
pLayerIndex | The index of the layer whose position is to be calculated |
pFocusedLayer | Layer The index of the layer which currently has the stacked view focus. |
VgEngine::VgPosition VgMyStackedLayerAndCameraHandlerOldWithPinch::getPositionForLayerInGlobalView | ( | unsigned int | pLayerIndex, |
unsigned int | pFocusedLayer | ||
) |
Gets the position for a layer when in global view.
pLayerIndex | The index of the layer whose position is to be calculated |
pFocusedLayer | Layer The index of the layer which currently has the stacked view focus. |
const VgEngine::VgPosition& VgMyStackedLayerAndCameraHandlerOldWithPinch::getStackCenter | ( | ) |
Get the stack center.
VgEngine::VgIViewPoint& VgMyStackedLayerAndCameraHandlerOldWithPinch::getStackViewPoint | ( | ) |
|
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.
|
virtual |
Focus a specific layer.
pLayerIndex | 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.
|
protected |
|
protected |
|
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.
|
virtual |
Implements VgMyLayerAndCameraHandler.
void VgMyStackedLayerAndCameraHandlerOldWithPinch::onLayerSelected | ( | ) |
void VgMyStackedLayerAndCameraHandlerOldWithPinch::onSelectorReady | ( | ) |
|
virtual |
Refreshes the inner parameters.
Typically, subclasses can use it to recompute their view parameters when the rendering size changes.
Implements VgMyLayerAndCameraHandler.
void VgMyStackedLayerAndCameraHandlerOldWithPinch::refreshStackView | ( | ) |
|
protected |
|
protected |
void VgMyStackedLayerAndCameraHandlerOldWithPinch::setParam | ( | const VgMyConfigurableParam | pParam, |
const double | pDouble | ||
) |
Allows application to customise the look and feel of the VgMyStackedLayerAndCameraHandlerOldWithPinch.
pParam | The parameter to be set. Please see the VgMyConfigurableParam type to gain an understanding of what each configurable parameter is responsible for. |
pDouble | The value to be set. |
void VgMyStackedLayerAndCameraHandlerOldWithPinch::setStackCenterPosition | ( | const VgEngine::VgPosition & | pCenter | ) |
|
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.
|
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 VgMyStackedLayerAndCameraHandlerOldWithPinch::updateManipulatorForGlobalView | ( | bool | pIsGlobalView | ) |
Updates the manipulator, according to the stack state.
pIsGlobalView | True if the stack state is currently the global view. False if the the stack state is detailed view. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |