Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

vrvis::ZoomAction Class Reference

Abstract monostate base class for ZoomInAction and ZoomOutAction. More...

#include <DefaultActions.hpp>

Inheritance diagram for vrvis::ZoomAction:

vrvis::DigitalAction vrvis::Action vrvis::ZoomInAction vrvis::ZoomOutAction List of all members.

Public Member Functions

virtual ~ZoomAction (void)
 Virtual destructor.
virtual void execute (const gadget::Digital::State cButtonState)=0
 Zooming; to be inherited by the two child classes.

Static Public Member Functions

float getZoomFactor (void)
 Get the current zoom factor.

Protected Member Functions

 ZoomAction (const std::string &crName)
 Protected constructor that passes the given name to DigitalAction.

Static Protected Attributes

float sZoomFactor = 1.0f
 Current zoom factor.
const float scMultiplicator = 1.05f
 Multiplicator to calculate the new zoom factor upon execution.
const float scMinZoomFactor = 0.1f
 Smallest zoom factor allowed.
const float scMaxZoomFactor = 20.0f
 Largest zoom factor allowed.

Detailed Description

Abstract monostate base class of ZoomInAction and ZoomOutAction. Its only purpose is to provide access to common variables for the child classes.
See also:
ZoomInAction, ZoomOutAction


Constructor & Destructor Documentation

ZoomAction::~ZoomAction void   )  [virtual]
 

Virtual destructor.

ZoomAction::ZoomAction const std::string &  crName  )  [protected]
 

Protected constructor, passing a child's name to the DigitalAction constructor.

Parameters:
[in] crName Name of the ZoomAction.


Member Function Documentation

virtual void vrvis::ZoomAction::execute const gadget::Digital::State  cButtonState  )  [pure virtual]
 

Implements vrvis::DigitalAction.

Implemented in vrvis::ZoomInAction, and vrvis::ZoomOutAction.

float ZoomAction::getZoomFactor void   )  [static]
 

Get the current zoom factor valid for all ZoomActions.

Returns:
Zoom factor.


Member Data Documentation

const float ZoomAction::scMaxZoomFactor = 20.0f [static, protected]
 

Maximal allowed zoom factor, 20.0 times the original size.

const float ZoomAction::scMinZoomFactor = 0.1f [static, protected]
 

Minimal allowed zoom factor, 0.1 times the original size.

const float ZoomAction::scMultiplicator = 1.05f [static, protected]
 

Factor to multiply the zoom factor with upon execution of a ZoomAction.

float ZoomAction::sZoomFactor = 1.0f [static, protected]
 

Current zoom factor, initialized to 1.0f, which means original size.


The documentation for this class was generated from the following files:
Generated on Tue Sep 21 07:31:10 2004 for VRVis by doxygen 1.3.8