gramods
Public Member Functions | Static Public Attributes | List of all members
gramods::gmTrack::Controller Class Reference

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>

Inheritance diagram for gramods::gmTrack::Controller:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmTrack::Controller:
Collaboration graph
[legend]

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
 

Detailed Description

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.

Member Function Documentation

◆ getAnalogs()

bool gramods::gmTrack::Controller::getAnalogs ( AnalogsTracker::AnalogsSample a)

Replaces the contents of p with analogs data.

Returns true on success, false otherwise.

◆ getButtons()

bool gramods::gmTrack::Controller::getButtons ( ButtonsTracker::ButtonsSample b)

Replaces the contents of p with buttons data.

Returns true on success, false otherwise.

◆ getDefaultKey()

virtual std::string gramods::gmTrack::Controller::getDefaultKey ( )
inlineoverridevirtual

Returns the default key, in Configuration, for the Object.

Reimplemented from gramods::gmCore::Object.

◆ getPose()

bool gramods::gmTrack::Controller::getPose ( PoseTracker::PoseSample p)

Replaces the contents of p with pose data.

Returns true on success, false otherwise.

◆ setAnalogsTracker()

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

◆ setButtonsTracker()

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

◆ setSinglePoseTracker()

void gramods::gmTrack::Controller::setSinglePoseTracker ( std::shared_ptr< SinglePoseTracker spt)

Sets the pose tracker associated with this controller.

XML-attribute: singlePoseTracker

◆ traverse()

void gramods::gmTrack::Controller::traverse ( Visitor visitor)
overridevirtual

Propagates the specified visitor.

See also
Object::Visitor

Reimplemented from gramods::gmCore::Object.


The documentation for this class was generated from the following files: