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

vrvis::Action Class Reference

Abstract base class of all Actions. More...

#include <Action.hpp>

Inheritance diagram for vrvis::Action:

vrvis::AnalogAction vrvis::DigitalAction vrvis::RotateAction vrvis::SelectAction< SelectableT > vrvis::ToggleAction vrvis::TranslateAction vrvis::ZoomAction vrvis::RotateXAction vrvis::RotateYAction vrvis::ZoomInAction vrvis::ZoomOutAction List of all members.

Public Member Functions

Destructor
virtual ~Action (void)
 Virtual destructor.
Accessors
const std::string & getName (void) const
 Name accessor.

Protected Member Functions

Constructor
 Action (const std::string &crName)
 Standard constructor.
Accessors
InputgetInput (void) const
 Input accessor for child classes.
Activation
virtual void activate (void)
 Commands to execute on activation of this Action.
virtual void deactivate (void)
 Commands to execute on deactivation of this Action.

Static Protected Member Functions

ActiongetByName (const std::string &crName)
 Static function for Action access by name.

Detailed Description

All classes that represent interactions with the VR scene are indirectly derived from Action. Every input from an input device (e.g. a CAVE wand) triggers an Action that is linked to it. Actions own an Input pointer through which they can access and alter parts of the scene, drawing, etc..
See also:
AnalogAction, DigitalAction, Input


Constructor & Destructor Documentation

Action::~Action void   )  [virtual]
 

Virtual destructor.

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

Constructs an Action with the given name and adds it to the static storage. May only be called by child classes.

Parameters:
[in] crName Name of this Action.


Member Function Documentation

void Action::activate void   )  [protected, virtual]
 

A virtual method, through which each Action can execute code on activation of the owning ActionSet, if desired. It is called once for each Action right after changing the active ActionSet. The default implementation is empty.

See also:
Input::changeActiveActionSet()

Reimplemented in vrvis::SelectAction< SelectableT >.

void Action::deactivate void   )  [protected, virtual]
 

A virtual method, through which each Action can execute code on deactivation of the owning ActionSet, if desired. It is called once for each Action right before changing the active ActionSet. The default implementation is empty.

See also:
Input::changeActiveActionSet()

Reimplemented in vrvis::SelectAction< SelectableT >.

Action * Action::getByName const std::string &  crName  )  [static, protected]
 

Accesses the Action object with the given name.

Parameters:
[in] crName Name of the Action to be accessed.
Returns:
Action pointer if Action exists, 0 if not.

Input * Action::getInput void   )  const [protected]
 

Accesses the Input object, prints error message and exits if Action is not yet added to an ActionSet.

Returns:
Input pointer.

const std::string & Action::getName void   )  const
 

Accesses the name of the Action object.

Returns:
Const reference to the name string.


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