gramods
|
The base of OpenVRPoseTrackers. More...
#include <OpenVRPoseTracker.hh>
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... | |
![]() | |
virtual std::string | getDefaultKey () override |
Returns the default key, in Configuration, for the Object. More... | |
![]() | |
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 | |
![]() | |
typedef std::chrono::steady_clock | clock |
The base of OpenVRPoseTrackers.
|
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.
void gramods::gmTrack::OpenVRPoseTracker::setOpenVR | ( | std::shared_ptr< gmCore::OpenVR > | openvr | ) |
Set the OpenVR instance.
XML-attribute: openVR
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
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
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
|
overridevirtual |
Propagates the specified visitor.
Reimplemented from gramods::gmCore::Object.