Support Forum G3D Web Page |
Low-level eXtended Reality (AR/VR/MR) API base class, analogous to 2D GUI OSWindow for a VR system. More...
Inherits G3D::ReferenceCountedObject.
Inherited by G3D::EmulatedXR, G3D::MonitorXR, and G3D::OpenVR.
Classes | |
class | Controller |
Wand with buttons and joysticks or equivalent. More... | |
class | Event |
We don't provide motion or button events because those are polled directly from the trackedObjectArray(). More... | |
class | Hand |
Tracked human hand. More... | |
class | HMD |
Display attached to the head. More... | |
class | Object |
class | Settings |
Reserved for future use. More... | |
class | TrackedVolume |
Public Member Functions | |
virtual const String & | className () const =0 |
Which subclass of XR is this? More... | |
virtual void | cleanup () |
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) |
virtual void | preGraphicsInit (const Settings &settings) |
const TrackedVolume & | trackedVolume () const |
virtual void | updateTrackingData ()=0 |
Call once per frame. More... | |
Static Public Member Functions | |
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 | |
XR () | |
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 | |
Queue< shared_ptr< XR::Event > > | m_eventQueue |
Array< shared_ptr< HMD > > | m_hmdArray |
Array< shared_ptr< Object > > | m_objectArray |
TrackedVolume | m_trackedVolume |
Low-level eXtended Reality (AR/VR/MR) API base class, analogous to 2D GUI OSWindow for a VR system.
Subclasses should provide a static create() method which instantiates the object but performs no intialization (because the graphics context and other parts of the system will not be initialized themselves yet at instantiation time).
All coordinate frames are relative to the the TrackedVolume. See G3D::XRWidget for a high-level API that manages frames in world space.
|
inlineprotected |
|
pure virtual |
Which subclass of XR is this?
Implemented in G3D::EmulatedXR, G3D::OpenVR, and G3D::MonitorXR.
|
inlinevirtual |
Reimplemented in G3D::EmulatedXR, G3D::OpenVR, and G3D::MonitorXR.
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
|
inlinevirtual |
Returns nullptr when out of events.
All tracked objects, including HMDs.
|
inlinevirtual |
Reimplemented in G3D::EmulatedXR, G3D::OpenVR, and G3D::MonitorXR.
|
inlinevirtual |
Reimplemented in G3D::EmulatedXR, G3D::OpenVR, and G3D::MonitorXR.
|
static |
Allows XR subclasses to access protected variables inside a tracked object.
|
inline |
|
pure virtual |
Call once per frame.
Implemented in G3D::EmulatedXR, G3D::OpenVR, and G3D::MonitorXR.
Referenced by nextEvent().
Referenced by hmdArray().
Referenced by objectArray().
|
protected |
Referenced by trackedVolume().