Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

VgMyStackedLayerAndCameraHandlerOldWithPinch Class Reference

Inheritance diagram for VgMyStackedLayerAndCameraHandlerOldWithPinch:
Inheritance graph
[legend]
Collaboration diagram for VgMyStackedLayerAndCameraHandlerOldWithPinch:
Collaboration graph
[legend]

List of all members.

Public Types

enum  VgMyConfigurableParam {
  eFarAwayHeight, eStackViewHeading, eStackViewPitch, eLayerMaxSize,
  eStackViewDistance, eLayerDistance, eLayerDistanceFromCurrent, eAnimateToDetailCameraDuration,
  eAnimateToGlobalCameraDuration, eAnimateToGlobalLayerDuration, eAnimateToDetailLayerDuration, eAnimateChangeOfLayerDuration,
  eAnimateCancelPinchDuration, eAnimateCancelDragDuration, eAnimateMaxViewPointDuration, eStackTriggerThreshold,
  eChangeLayerTriggerThreshold, eLayerTriggerThreshold, eMaxDoubleParams
}
typedef enum
VgMyStackedLayerAndCameraHandlerOldWithPinch::VgMyConfigurableParam 
VgMyConfigurableParam

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.
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.
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 gotoLayer (const unsigned int pLayerIndex, bool pIsAnimated=true)
 Focus a specific layer.
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.
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.
VgEngine::VgPosition getPositionForLayerInDetailedView (unsigned int pLayerIndex, unsigned int pFocusedLayer)
 Gets the position for a layer when in detailed view.
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.
void refreshStackView ()
void setParam (const VgMyConfigurableParam pParam, const double pDouble)
 Allows application to customise the look and feel of the VgMyStackedLayerAndCameraHandlerOldWithPinch.
double getParam (const VgMyConfigurableParam pParam)
 Retrieve a parameter value.
void updateManipulatorForGlobalView (bool pIsGlobalView)
 Updates the manipulator, according to the stack state.

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
VgMyLayerAndCameraListenermLayerUpdateListener
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

Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
eFarAwayHeight 
eStackViewHeading 
eStackViewPitch 
eLayerMaxSize 
eStackViewDistance 
eLayerDistance 
eLayerDistanceFromCurrent 
eAnimateToDetailCameraDuration 
eAnimateToGlobalCameraDuration 
eAnimateToGlobalLayerDuration 
eAnimateToDetailLayerDuration 
eAnimateChangeOfLayerDuration 
eAnimateCancelPinchDuration 
eAnimateCancelDragDuration 
eAnimateMaxViewPointDuration 
eStackTriggerThreshold 
eChangeLayerTriggerThreshold 
eLayerTriggerThreshold 
eMaxDoubleParams 

Constructor & Destructor Documentation

VgMyStackedLayerAndCameraHandlerOldWithPinch::VgMyStackedLayerAndCameraHandlerOldWithPinch ( VgApplication::VgIApplication *  pVgApplication,
VgMyLayerAndCameraListener pListener,
unsigned int  pViewWidthInPixels,
unsigned int  pViewHeightInPixels 
)
virtual VgMyStackedLayerAndCameraHandlerOldWithPinch::~VgMyStackedLayerAndCameraHandlerOldWithPinch (  ) [virtual]

Member Function Documentation

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 
)
void VgMyStackedLayerAndCameraHandlerOldWithPinch::calculateDynamicStackParams (  ) [protected]
VgEngine::VgPosition* VgMyStackedLayerAndCameraHandlerOldWithPinch::getCameraPosition (  )
unsigned int VgMyStackedLayerAndCameraHandlerOldWithPinch::getCurrentLayerIndex (  ) const
const std::string& VgMyStackedLayerAndCameraHandlerOldWithPinch::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.

Returns:
The focused layer's name.

Implements VgMyLayerAndCameraHandler.

bool VgMyStackedLayerAndCameraHandlerOldWithPinch::getLayerName ( const unsigned int  pLayerIndex,
std::string &  pLayerNameOut 
) [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().

Implements VgMyLayerAndCameraHandler.

unsigned int VgMyStackedLayerAndCameraHandlerOldWithPinch::getNumberOfLayers (  ) [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.

Parameters:
pLayerIndexThe index of the layer whose position is to be calculated
pFocusedLayer The index of the layer which currently has the stacked view focus.
Returns:
The position for the requested layer.
VgEngine::VgPosition VgMyStackedLayerAndCameraHandlerOldWithPinch::getPositionForLayerInGlobalView ( unsigned int  pLayerIndex,
unsigned int  pFocusedLayer 
)

Gets the position for a layer when in global view.

Parameters:
pLayerIndexThe index of the layer whose position is to be calculated
pFocusedLayer The index of the layer which currently has the stacked view focus.
Returns:
The position for the requested layer.
const VgEngine::VgPosition& VgMyStackedLayerAndCameraHandlerOldWithPinch::getStackCenter (  )

Get the stack center.

VgEngine::VgIViewPoint& VgMyStackedLayerAndCameraHandlerOldWithPinch::getStackViewPoint (  )
void VgMyStackedLayerAndCameraHandlerOldWithPinch::gotoLayer ( const std::string &  pLayerName,
bool  pIsAnimated = true 
) [virtual]

Focus a specific layer.

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

Implements VgMyLayerAndCameraHandler.

void VgMyStackedLayerAndCameraHandlerOldWithPinch::gotoLayer ( const unsigned int  pLayerIndex,
bool  pIsAnimated = true 
) [virtual]

Focus a specific layer.

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

Implements VgMyLayerAndCameraHandler.

void VgMyStackedLayerAndCameraHandlerOldWithPinch::gotoLayerInDetailedView ( const unsigned int  pLayerIndex,
bool  pIsAnimated 
) [protected]
void VgMyStackedLayerAndCameraHandlerOldWithPinch::gotoLayerInGlobalView ( const unsigned int  pLayerIndex,
bool  pIsAnimated 
) [protected]
void VgMyStackedLayerAndCameraHandlerOldWithPinch::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.

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.

Implements VgMyLayerAndCameraHandler.

void VgMyStackedLayerAndCameraHandlerOldWithPinch::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.

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.

Implements VgMyLayerAndCameraHandler.

bool VgMyStackedLayerAndCameraHandlerOldWithPinch::isGlobalView (  ) [virtual]
Returns:
TRUE if the Handler displays the global view. FALSE if displaying the detailed view.

Implements VgMyLayerAndCameraHandler.

void VgMyStackedLayerAndCameraHandlerOldWithPinch::onLayerSelected (  )
void VgMyStackedLayerAndCameraHandlerOldWithPinch::onSelectorReady (  )
void VgMyStackedLayerAndCameraHandlerOldWithPinch::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 VgMyStackedLayerAndCameraHandlerOldWithPinch::refreshStackView (  )
VgEngine::VgRefPtr< VgEngine::VgIAnimationCallback > VgMyStackedLayerAndCameraHandlerOldWithPinch::registerCallback ( VgEngine::VgRefPtr< VgEngine::VgIAnimationCallback >  pCallback,
unsigned int  pLayerIndex 
) [protected]
void VgMyStackedLayerAndCameraHandlerOldWithPinch::setDefaultStackParams (  ) [protected]
void VgMyStackedLayerAndCameraHandlerOldWithPinch::setParam ( const VgMyConfigurableParam  pParam,
const double  pDouble 
)

Allows application to customise the look and feel of the VgMyStackedLayerAndCameraHandlerOldWithPinch.

Parameters:
pParamThe parameter to be set. Please see the VgMyConfigurableParam type to gain an understanding of what each configurable parameter is responsible for.
Note:
If parameters are changed via this method, then it is necessary to call refreshStackView() in order for the global stack view to be updated to reflect the new values.
void VgMyStackedLayerAndCameraHandlerOldWithPinch::setStackCenterPosition ( const VgEngine::VgPosition &  pCenter )
void VgMyStackedLayerAndCameraHandlerOldWithPinch::switchToDetailedView ( bool  pIsAnimated = true ) [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.

Implements VgMyLayerAndCameraHandler.

void VgMyStackedLayerAndCameraHandlerOldWithPinch::switchToGlobalView ( bool  pIsAnimated = true ) [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.

Implements VgMyLayerAndCameraHandler.

void VgMyStackedLayerAndCameraHandlerOldWithPinch::updateManipulatorForGlobalView ( bool  pIsGlobalView )

Updates the manipulator, according to the stack state.

Parameters:
pIsGlobalViewTrue if the stack state is currently the global view. False if the the stack state is detailed view.

Member Data Documentation

VgEngine::VgRefPtr< VgEngine::VgIAnimationCallback > VgMyStackedLayerAndCameraHandlerOldWithPinch::mCameraCallback [protected]
std::vector<VgEngine::VgRefPtr< VgEngine::VgIAnimationCallback > > VgMyStackedLayerAndCameraHandlerOldWithPinch::mLayersCallback [protected]
std::hash_map<std::string, float> VgMyStackedLayerAndCameraHandlerOldWithPinch::mLoadFactors [protected]
std::hash_map<std::string, float> VgMyStackedLayerAndCameraHandlerOldWithPinch::mLODsFactors [protected]
double VgMyStackedLayerAndCameraHandlerOldWithPinch::mParam[eMaxDoubleParams] [protected]
VgApplication::VgIApplication* VgMyStackedLayerAndCameraHandlerOldWithPinch::mVgApplication [protected]

The documentation for this class was generated from the following file:
VisioDevKit 2.0, Visioglobe® 2013