Plasma Engine  2.0
Loading...
Searching...
No Matches
plOpenXR Class Reference
Inheritance diagram for plOpenXR:

Public Member Functions

XrInstance GetInstance () const
 
uint64_t GetSystemId () const
 
XrSession GetSession () const
 
XrViewConfigurationType GetViewType () const
 
bool GetDepthComposition () const
 
virtual bool IsHmdPresent () const override
 Returns whether an HMD is available. Can be used to decide whether it makes sense to call Initialize at all.
 
virtual plResult Initialize () override
 Initializes the XR system. This can be quite time consuming as it will generally start supporting applications needed to run and start up the HMD if it went to sleep.
 
virtual void Deinitialize () override
 Shuts down the XR system again.
 
virtual bool IsInitialized () const override
 Returns whether the XR system is initialized.
 
virtual const plHMDInfoGetHmdInfo () const override
 Returns general HMD information.
 
virtual plXRInputDeviceGetXRInput () const override
 Returns the XR input device.
 
virtual plGALTextureHandle GetCurrentTexture () override
 Called by plWindowOutputTargetXR::RenderCompanionView Returns the color texture to be used by the companion view if enabled, otherwise an invalid handle.
 
void DelayPresent ()
 
void Present ()
 
void EndFrame ()
 
virtual plUniquePtr< plActorCreateActor (plView *pView, plGALMSAASampleCount::Enum msaaCount=plGALMSAASampleCount::None, plUniquePtr< plWindowBase > pCompanionWindow=nullptr, plUniquePtr< plWindowOutputTargetGAL > pCompanionWindowOutput=nullptr) override
 Creates a XR actor by trying to startup an XR session.
 
virtual void OnActorDestroyed () override
 Called when the actor created by 'CreateActor' is destroyed.
 
virtual bool SupportsCompanionView () override
 Returns true if a companion window can be passed into CreateActor.
 
XrSpace GetBaseSpace () const
 
Setup
Devices
View
Internal

Static Public Member Functions

static XrPosef ConvertTransform (const plTransform &tr)
 
static XrQuaternionf ConvertOrientation (const plQuat &q)
 
static XrVector3f ConvertPosition (const plVec3 &vPos)
 
static plQuat ConvertOrientation (const XrQuaternionf &q)
 
static plVec3 ConvertPosition (const XrVector3f &pos)
 
static plMat4 ConvertPoseToMatrix (const XrPosef &pose)
 
static plGALResourceFormat::Enum ConvertTextureFormat (int64_t format)
 

Friends

class plOpenXRInputDevice
 
class plOpenXRSpatialAnchors
 
class plOpenXRHandTracking
 
class plOpenXRRemoting
 
class plGALOpenXRSwapChain
 

Member Function Documentation

◆ CreateActor()

plUniquePtr< plActor > plOpenXR::CreateActor ( plView * pView,
plGALMSAASampleCount::Enum msaaCount = plGALMSAASampleCount::None,
plUniquePtr< plWindowBase > pCompanionWindow = nullptr,
plUniquePtr< plWindowOutputTargetGAL > pCompanionWindowOutput = nullptr )
overridevirtual

Creates a XR actor by trying to startup an XR session.

If SupportsCompanionView is true (VR only), a normal window and window output can be passed in. The window will be used to blit the VR output into the window.

Implements plXRInterface.

◆ Deinitialize()

void plOpenXR::Deinitialize ( )
overridevirtual

Shuts down the XR system again.

Implements plXRInterface.

◆ GetCurrentTexture()

plGALTextureHandle plOpenXR::GetCurrentTexture ( )
overridevirtual

Called by plWindowOutputTargetXR::RenderCompanionView Returns the color texture to be used by the companion view if enabled, otherwise an invalid handle.

Implements plXRInterface.

◆ GetHmdInfo()

const plHMDInfo & plOpenXR::GetHmdInfo ( ) const
overridevirtual

Returns general HMD information.

Implements plXRInterface.

◆ GetXRInput()

plXRInputDevice & plOpenXR::GetXRInput ( ) const
overridevirtual

Returns the XR input device.

Implements plXRInterface.

◆ Initialize()

plResult plOpenXR::Initialize ( )
overridevirtual

Initializes the XR system. This can be quite time consuming as it will generally start supporting applications needed to run and start up the HMD if it went to sleep.

Implements plXRInterface.

◆ IsHmdPresent()

bool plOpenXR::IsHmdPresent ( ) const
overridevirtual

Returns whether an HMD is available. Can be used to decide whether it makes sense to call Initialize at all.

Implements plXRInterface.

◆ IsInitialized()

bool plOpenXR::IsInitialized ( ) const
overridevirtual

Returns whether the XR system is initialized.

Implements plXRInterface.

◆ OnActorDestroyed()

void plOpenXR::OnActorDestroyed ( )
overridevirtual

Called when the actor created by 'CreateActor' is destroyed.

Implements plXRInterface.

◆ SupportsCompanionView()

bool plOpenXR::SupportsCompanionView ( )
overridevirtual

Returns true if a companion window can be passed into CreateActor.

Implements plXRInterface.


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