XR singleton interface. Needs to be initialized to be used for VR or AR purposes.
More...
#include <XRInterface.h>
|
virtual bool | IsHmdPresent () const =0 |
| Returns whether an HMD is available. Can be used to decide whether it makes sense to call Initialize at all.
|
|
|
virtual ezResult | Initialize ()=0 |
| 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 ()=0 |
| Shuts down the XR system again.
|
|
virtual bool | IsInitialized () const =0 |
| Returns whether the XR system is initialized.
|
|
|
virtual const ezHMDInfo & | GetHmdInfo () const =0 |
| Returns general HMD information.
|
|
virtual ezXRInputDevice & | GetXRInput () const =0 |
| Returns the XR input device.
|
|
|
virtual bool | SupportsCompanionView ()=0 |
| Returns true if a companion window can be passed into CreateActor.
|
|
virtual ezUniquePtr< ezActor > | CreateActor (ezView *pView, ezGALMSAASampleCount::Enum msaaCount=ezGALMSAASampleCount::None, ezUniquePtr< ezWindowBase > pCompanionWindow=nullptr, ezUniquePtr< ezWindowOutputTargetGAL > pCompanionWindowOutput=nullptr)=0 |
| Creates a XR actor by trying to startup an XR session.
|
|
|
virtual ezGALTextureHandle | GetCurrentTexture ()=0 |
| Called by ezWindowOutputTargetXR::RenderCompanionView Returns the color texture to be used by the companion view if enabled, otherwise an invalid handle.
|
|
virtual void | OnActorDestroyed ()=0 |
| Called when the actor created by 'CreateActor' is destroyed.
|
|
XR singleton interface. Needs to be initialized to be used for VR or AR purposes.
To be used in a project the project needs to have an enabled ezXRConfig with a set render pipeline in the platform profile. To then use the interface, Initialize must be called first and on success CreateActor. Everything else is optional. Aquire interface via ezSingletonRegistry::GetSingletonInstance<ezXRInterface>().
◆ CreateActor()
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.
Implemented in ezDummyXR, and ezOpenXR.
◆ Deinitialize()
virtual void ezXRInterface::Deinitialize |
( |
| ) |
|
|
pure virtual |
◆ GetCurrentTexture()
Called by ezWindowOutputTargetXR::RenderCompanionView Returns the color texture to be used by the companion view if enabled, otherwise an invalid handle.
Implemented in ezDummyXR, and ezOpenXR.
◆ GetHmdInfo()
virtual const ezHMDInfo & ezXRInterface::GetHmdInfo |
( |
| ) |
const |
|
pure virtual |
◆ GetXRInput()
◆ Initialize()
virtual ezResult ezXRInterface::Initialize |
( |
| ) |
|
|
pure virtual |
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.
Implemented in ezDummyXR, and ezOpenXR.
◆ IsHmdPresent()
virtual bool ezXRInterface::IsHmdPresent |
( |
| ) |
const |
|
pure virtual |
Returns whether an HMD is available. Can be used to decide whether it makes sense to call Initialize at all.
Implemented in ezDummyXR, and ezOpenXR.
◆ IsInitialized()
virtual bool ezXRInterface::IsInitialized |
( |
| ) |
const |
|
pure virtual |
Returns whether the XR system is initialized.
Implemented in ezDummyXR, and ezOpenXR.
◆ OnActorDestroyed()
virtual void ezXRInterface::OnActorDestroyed |
( |
| ) |
|
|
pure virtual |
Called when the actor created by 'CreateActor' is destroyed.
Implemented in ezDummyXR, and ezOpenXR.
◆ SupportsCompanionView()
virtual bool ezXRInterface::SupportsCompanionView |
( |
| ) |
|
|
pure virtual |
Returns true if a companion window can be passed into CreateActor.
Implemented in ezDummyXR, and ezOpenXR.
The documentation for this class was generated from the following file:
- /home/runner/work/ezEngine/ezEngine/Code/Engine/GameEngine/XR/XRInterface.h