Support Forum G3D Web Page |
Implementation of the G3D::XR interface using the OpenVR API by Valve.
More...
Inherits G3D::XR.
Classes | |
class | OpenVRController |
class | OpenVRHMD |
Public Member Functions | |
virtual const String & | className () const override |
Which subclass of XR is this? More... | |
virtual void | cleanup () override |
const Array< shared_ptr< HMD > > & | hmdArray () const |
virtual shared_ptr< Event > | nextEvent () |
Returns nullptr when out of events. More... | |
const Array< shared_ptr< Object > > & | objectArray () const |
All tracked objects, including HMDs. More... | |
virtual void | postGraphicsInit (const Settings &settings) override |
virtual void | preGraphicsInit (const Settings &settings) override |
const TrackedVolume & | trackedVolume () const |
virtual void | updateTrackingData () override |
Call once per frame. More... | |
Static Public Member Functions | |
static bool | available () |
Returns true if there is a HMD available on this machine. More... | |
static shared_ptr< OpenVR > | create () |
static void | setFrame (const shared_ptr< Object > &t, const CFrame &f, const CFrame &p) |
Allows XR subclasses to access protected variables inside a tracked object. More... | |
Protected Member Functions | |
OpenVR () | |
void | setLeftController (const shared_ptr< OpenVRController > &controller) |
void | setRightController (const shared_ptr< OpenVRController > &controller) |
Static Protected Member Functions | |
template<class T , class ... ArgTypes> | |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
Like std::make_shared, but works for protected constructors. More... | |
Protected Attributes | |
Array< shared_ptr< OpenVRController > > | m_controllerArray |
float | m_displayFrequency = 0.0f |
Queue< shared_ptr< XR::Event > > | m_eventQueue |
bool | m_hasTouchpad |
shared_ptr< OpenVRHMD > | m_hmd |
Array< shared_ptr< HMD > > | m_hmdArray |
shared_ptr< OpenVRController > | m_leftController |
Array< shared_ptr< Object > > | m_objectArray |
Vector2uint32 | m_resolution |
shared_ptr< OpenVRController > | m_rightController |
vr::IVRSystem * | m_system = nullptr |
TrackedVolume | m_trackedVolume |
Implementation of the G3D::XR interface using the OpenVR API by Valve.
Supports Oculus Rift, Vive, DK2, and OSVR devices.
This class is G3D-gfx because it directly makes use of graphics-API specific calls such as vr::IVRTrackedCamera::GetVideoStreamTextureGL
and vr::IVRCompositor::Submit
.
|
inlineprotected |
|
static |
Returns true if there is a HMD available on this machine.
|
inlineoverridevirtual |
|
overridevirtual |
Reimplemented from G3D::XR.
|
inlinestatic |
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
|
inlinevirtualinherited |
Returns nullptr when out of events.
All tracked objects, including HMDs.
|
overridevirtual |
Reimplemented from G3D::XR.
|
overridevirtual |
Reimplemented from G3D::XR.
|
staticinherited |
Allows XR subclasses to access protected variables inside a tracked object.
|
protected |
|
protected |
|
inlineinherited |
|
overridevirtual |
Call once per frame.
Implements G3D::XR.
|
protected |
|
protected |
Referenced by G3D::XR::nextEvent().
|
protected |
|
protected |
Referenced by G3D::XR::hmdArray().
|
protected |
Referenced by G3D::OpenVR::OpenVRHMD::setLeftController().
Referenced by G3D::XR::objectArray().
|
protected |
|
protected |
Referenced by G3D::OpenVR::OpenVRHMD::setRightController().
|
protected |
|
protectedinherited |
Referenced by G3D::XR::trackedVolume().