|
gramods
|
A controller is a combination of one or more of a pose tracker, buttons tracker and analogs tracker, also called Wand. More...
#include <Controller.hh>


Public Member Functions | |
| bool | getPose (PoseTracker::PoseSample &p) |
| Replaces the contents of p with pose data. More... | |
| bool | getButtons (ButtonsTracker::ButtonsSample &b) |
| Replaces the contents of p with buttons data. More... | |
| bool | getAnalogs (AnalogsTracker::AnalogsSample &a) |
| Replaces the contents of p with analogs data. More... | |
| void | setSinglePoseTracker (std::shared_ptr< SinglePoseTracker > spt) |
| Sets the pose tracker associated with this controller. More... | |
| void | setButtonsTracker (std::shared_ptr< ButtonsTracker > bt) |
| Sets the buttons tracker associated with this controller. More... | |
| void | setAnalogsTracker (std::shared_ptr< AnalogsTracker > at) |
| Sets the analogs tracker associated with this controller. More... | |
| virtual std::string | getDefaultKey () override |
| Returns the default key, in Configuration, for the Object. More... | |
| void | traverse (Visitor *visitor) override |
| Propagates the specified visitor. More... | |
Public Member Functions inherited from gramods::gmCore::Object | |
| Object () | |
| Initializes internal data. More... | |
| virtual | ~Object () |
| Cleaning up internal data. More... | |
| virtual void | initialize () |
| Called to initialize the Object. More... | |
| virtual void | accept (Visitor *visitor) |
| Calls the visitors apply method with this as argument. More... | |
| bool | isInitialized () |
| Returns true if the Object is initialized. More... | |
Static Public Attributes | |
| static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
A controller is a combination of one or more of a pose tracker, buttons tracker and analogs tracker, also called Wand.
This class does not do anything but group trackers together and forward call to them.
Observe that a stationary controller may not have a pose tracker associated with it and calling getPose would then return false. Likewise one or more of the other trackers may also be missing in a valid configuration.
| bool gramods::gmTrack::Controller::getAnalogs | ( | AnalogsTracker::AnalogsSample & | a | ) |
Replaces the contents of p with analogs data.
Returns true on success, false otherwise.
| bool gramods::gmTrack::Controller::getButtons | ( | ButtonsTracker::ButtonsSample & | b | ) |
Replaces the contents of p with buttons data.
Returns true on success, false otherwise.
|
inlineoverridevirtual |
Returns the default key, in Configuration, for the Object.
Reimplemented from gramods::gmCore::Object.
| bool gramods::gmTrack::Controller::getPose | ( | PoseTracker::PoseSample & | p | ) |
Replaces the contents of p with pose data.
Returns true on success, false otherwise.
| void gramods::gmTrack::Controller::setAnalogsTracker | ( | std::shared_ptr< AnalogsTracker > | at | ) |
Sets the analogs tracker associated with this controller.
This is associated with the attribute analogsTracker in configuration data.
XML-attribute: analogsTracker
| void gramods::gmTrack::Controller::setButtonsTracker | ( | std::shared_ptr< ButtonsTracker > | bt | ) |
Sets the buttons tracker associated with this controller.
This is associated with the attribute buttonsTracker in configuration data.
XML-attribute: buttonsTracker
| void gramods::gmTrack::Controller::setSinglePoseTracker | ( | std::shared_ptr< SinglePoseTracker > | spt | ) |
Sets the pose tracker associated with this controller.
XML-attribute: singlePoseTracker
|
overridevirtual |
Propagates the specified visitor.
Reimplemented from gramods::gmCore::Object.