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

vrvis::Input Class Reference

Class representing all input devices and configurable figures. More...

#include <Input.hpp>

List of all members.

Public Member Functions

Constructor & Destructor
 Input (const std::string &crConfigFilename)
 Constructor that takes the name of the VRVis config file.
 ~Input (void)
 Destructor.
Read-only Data Access
const float & getBGColor (int colorIndex) const
 Get the background color for the visualization.
const gmtl::Point3f & getDrawOrigin (void)
 Get the drawing origin.
const gmtl::Point3f & getWandPos (void)
 Get the current wand position.
const gmtl::Point3f & getHeadPos (void)
 Get the current head position.
Read/write Matrix Handles
gmtl::Matrix44f & getTransRotMatrixHandle (void)
 Get a reference to the translation/rotation matrix.
gmtl::Matrix44f & getScaleMatrixHandle (void)
 Get a reference to the scale matrix.
ActionSet Management
ActionSetcreateActionSet (const std::string &crName)
 Create a new ActionSet instance.
ActionSetcreateDefaultActionSet (void)
 Create an instance of the default (transformation) ActionSet.
void changeActiveActionSet (void)
 Switch the active ActionSet to the next one in the queue.
Update
void update (void)
 Check all devices for occurring events.


Detailed Description

This class represents all possibilities to change the visualization scene externally. It manages all VR Juggler input devices and provides access to all configurable (e.g. drawing matrices) and read-only (e.g. user head position) application data. ActionSets to be used in the application can only be created in here.
See also:
ActionSet


Constructor & Destructor Documentation

Input::Input const std::string &  crConfigFilename  ) 
 

Constructor that initializes all devices given in the VRVis config file as well as all application data.

Parameters:
crConfigFilename Name/path of the VRVis config file.

Input::~Input void   ) 
 

Destructor.


Member Function Documentation

void Input::changeActiveActionSet void   ) 
 

Enables the next ActionSet in queue and re-queues the previous one. Deactivates all Actions in the old ActionSet and activates all Actions in the new one. This method is called upon release of the "ChangeActionSet" button configured in the VRVis config file.

See also:
Configuration

Action::activate(), Action::deactivate()

ActionSet * Input::createActionSet const std::string &  crName  ) 
 

Creates a new and empty ActionSet, which can be filled with any Actions afterwards. Input retains ownership of the ActionSet and is also responsible for its proper deletion.

Parameters:
crName Name of the ActionSet to be generated.
Returns:
The newly created ActionSet.
See also:
ActionSet

ActionSet * Input::createDefaultActionSet void   ) 
 

Creates an instance of the default ActionSet "Transformation", which is already filled with the default Actions configured in the VRVis config file.

Returns:
The newly created ActionSet.
See also:
Configuration

Default Actions (RotateAction, TranslateAction, ZoomAction, ...)

const float & Input::getBGColor int  colorIndex  )  const
 

Get the scene background color indicated by the given RGB index.

Parameters:
colorIndex Index of the color value to be returned (R = 0, G = 1, B = 2).
Returns:
Color value (0.0 - 1.0) for the given index.
Attention:
0 <= colorIndex <= 2!

const gmtl::Point3f & Input::getDrawOrigin void   ) 
 

Get the origin of the scene drawing.

Returns:
Drawing origin (GMTL point).

const gmtl::Point3f & Input::getHeadPos void   ) 
 

Updates the current head position member and returns it.

Returns:
Head position (GMTL point).

gmtl::Matrix44f & Input::getScaleMatrixHandle void   ) 
 

Returns an all-access handle to the scale drawing matrix.

Returns:
Matrix handle (GMTL matrix).

gmtl::Matrix44f & Input::getTransRotMatrixHandle void   ) 
 

Returns an all-access handle to the translation/rotation drawing matrix.

Returns:
Matrix handle (GMTL matrix).

const gmtl::Point3f & Input::getWandPos void   ) 
 

Updates the current wand position member and returns it.

Returns:
Wand position (GMTL point).

void Input::update void   ) 
 

Triggers occurring device events in all Actions of the active ActionSet. Initiates an ActionSet change if the corresponding button is released.

See also:
Configuration


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