#include <CrController.h>
Inheritance diagram for CrController:

Public Member Functions | |
| CrController (const short &) | |
| Parameterized constructor takes sensor id. | |
| virtual | ~CrController () |
| Virtual destructor. | |
| SoEvent * | getEvent () |
| Get the CrController's current SoEvent. | |
| void | setEvent (SoEvent *) |
| Sets the current SoEvent. (UNUSED?). | |
| void | setTool (CrTool *) |
| Attaches a tool to which Events will be sent. | |
Protected Member Functions | |
| virtual void | updateController () |
| Checks the device state and updates the CrController's data. | |
Protected Attributes | |
| SoEvent * | m_event |
| Current event object for the device state. | |
| SbVec3f | m_position |
| Current 3D controller position. | |
| SbRotation | m_rotation |
| Current 3D controller orientation stored as a quaternion. | |
| short | m_sensorID |
| Identifies the sensor. | |
| CrTool * | m_tool |
| Tool currently attached to the controller. | |
This implementation uses the Observer Pattern to notify observers that an event has taken place. Any observers must then get the controller's event and respond accordingly. A constroller may have a single CrTool object registered for directly receiving events. If multiple objects need to observe the controller, then a new observer may be needed.
|
|
Parameterized constructor takes sensor id.
|
|
|
Virtual destructor.
|
|
|
Get the CrController's current SoEvent.
|
|
|
Sets the current SoEvent. (UNUSED?).
|
|
|
Attaches a tool to which Events will be sent.
|
|
|
Checks the device state and updates the CrController's data.
Reimplemented in CrHapticController, and CrWandController. |
|
|
Current event object for the device state.
|
|
|
Current 3D controller position.
|
|
|
Current 3D controller orientation stored as a quaternion.
|
|
|
Identifies the sensor.
|
|
|
Tool currently attached to the controller.
|
1.4.3