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

The base of OpenVRPoseTrackers. More...

#include <OpenVRPoseTracker.hh>

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

Classes

struct  Impl
 

Public Member Functions

void setType (std::string)
 Set the device type (class) to track. More...
 
void setRole (std::string)
 Set the device role to track. More...
 
void setSerial (std::string)
 Set the serial number of the device to track. More...
 
bool getPose (PoseSample &p)
 Replaces the contents of p with pose data from the specified OpenVR pose source. More...
 
void setOpenVR (std::shared_ptr< gmCore::OpenVR > openvr)
 Set the OpenVR instance. More...
 
void traverse (Visitor *visitor) override
 Propagates the specified visitor. More...
 
- Public Member Functions inherited from gramods::gmTrack::SinglePoseTracker
virtual std::string getDefaultKey () override
 Returns the default key, in Configuration, for the Object. 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
 

Additional Inherited Members

- Public Types inherited from gramods::gmTrack::PoseTracker
typedef std::chrono::steady_clock clock
 

Detailed Description

The base of OpenVRPoseTrackers.

Member Function Documentation

◆ getPose()

bool gramods::gmTrack::OpenVRPoseTracker::getPose ( PoseSample p)
virtual

Replaces the contents of p with pose data from the specified OpenVR pose source.

Returns true if data could be read, false otherwise. Use sample time to check that the data are fresh.

Implements gramods::gmTrack::SinglePoseTracker.

◆ setOpenVR()

void gramods::gmTrack::OpenVRPoseTracker::setOpenVR ( std::shared_ptr< gmCore::OpenVR openvr)

Set the OpenVR instance.

XML-attribute: openVR

◆ setRole()

void gramods::gmTrack::OpenVRPoseTracker::setRole ( std::string  role)

Set the device role to track.

When the specified type, role and/or serial number does not match an available tracker, no data will be returned.

XML-attribute: role

◆ setSerial()

void gramods::gmTrack::OpenVRPoseTracker::setSerial ( std::string  s)

Set the serial number of the device to track.

When the specified type, role and/or serial number does not match an available tracker, no data will be returned.

XML-attribute: serial

◆ setType()

void gramods::gmTrack::OpenVRPoseTracker::setType ( std::string  type)

Set the device type (class) to track.

When the specified type, role and/or serial number does not match an available tracker, no data will be returned.

XML-attribute: type

◆ traverse()

void gramods::gmTrack::OpenVRPoseTracker::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: