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

vrvis::ActionSet Class Reference

Represents a logical group of Actions. More...

#include <ActionSet.hpp>

List of all members.

Public Member Functions

 ~ActionSet (void)
 Destructor.
const std::string & getName (void)
 Name accessor.
void addAnalogAction (const std::string &crDeviceName, AnalogAction *pAction)
 Adds an AnalogAction to this ActionSet.
void addDigitalAction (const std::string &crDeviceName, DigitalAction *pAction)
 Adds a DigitalAction to this ActionSet.
void activateActions (void)
 Call each Action's activate() method.
void deactivateActions (void)
 Call each Action's deactivate() method.
void triggerAnalogEvent (gadget::AnalogInterface *pAnalog)
 Triggers the AnalogAction for the given device.
void triggerDigitalEvent (gadget::DigitalInterface *pDigital)
 Triggers the DigitalAction for the given device.

Friends

ActionSetInput::createActionSet (const std::string &crName)
 Friend to construct ActionSet objects.


Detailed Description

This class logically groups together several (Analog and/or Digital) Actions that can be executed simultaneously. It represents one "layer" of Buttons, Wheels, etc. on the VR input device used for the visualization (e.g. a CAVE wand). By using several ActionSets you are able to embed more Action functionality in your application than one set of controls would allow. There is always exactly one ActionSet active. ActionSets are owned by and switched in the Input class.

See also:
Input


Constructor & Destructor Documentation

ActionSet::~ActionSet void   ) 
 

Destructor.


Member Function Documentation

void ActionSet::activateActions void   ) 
 

Call activate() method of all Actions in this ActionSet.

See also:
Action::activate()

void ActionSet::addAnalogAction const std::string &  crDeviceName,
AnalogAction pAction
 

Adds an AnalogAction for a certain input device to this ActionSet. If this input device has already been added, the Action is overwritten. If no device with this name was configured, an error message is issued.

Parameters:
[in] crDeviceName Name of the input device as configured (e.g. "VJAnalog0").
[in] pAction Pointer to the AnalogAction, that the device should trigger in this ActionSet.
See also:
Configuration, Juggler

void ActionSet::addDigitalAction const std::string &  crDeviceName,
DigitalAction pAction
 

Adds an DigitalAction for a certain input device to this ActionSet. If this input device has already been added, the Action is overwritten. If no device with this name was configured, an error message is issued.

Parameters:
[in] crDeviceName Name of the input device as configured (e.g. "VJButton0").
[in] pAction Pointer to the DigitalAction, that the device should trigger in this ActionSet.
See also:
Configuration, Juggler

void ActionSet::deactivateActions void   ) 
 

Call deactivate() method of all Actions in this ActionSet.

See also:
Action::deactivate()

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

Accesses the name of this ActionSet.

Returns:
The name string.

void ActionSet::triggerAnalogEvent gadget::AnalogInterface *  pAnalog  ) 
 

Triggers the AnalogAction stored for the given analog input device. If no Action is set for this device, do nothing.

Parameters:
[in] pAnalog Pointer to the analog input device.

void ActionSet::triggerDigitalEvent gadget::DigitalInterface *  pDigital  ) 
 

Triggers the DigitalAction stored for the given digital input device. If no Action is set for this device, do nothing.

Parameters:
[in] pDigital Pointer to the digital input device.


Friends And Related Function Documentation

ActionSet* Input::createActionSet const std::string &  crName  )  [friend]
 


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