Plasma Engine  2.0
Loading...
Searching...
No Matches
XRInterface.h
1#pragma once
2
3#include <GameEngine/GameEngineDLL.h>
4
5#include <Core/ActorSystem/Actor.h>
6#include <Core/ResourceManager/ResourceHandle.h>
7#include <GameEngine/GameApplication/WindowOutputTarget.h>
8#include <GameEngine/XR/Declarations.h>
9#include <RendererFoundation/RendererFoundationDLL.h>
10
12class plViewHandle;
13class plCamera;
15class plWorld;
16class plView;
17class plXRInputDevice;
18class plWindowBase;
20
29{
30public:
33 virtual bool IsHmdPresent() const = 0;
34
37
41 virtual plResult Initialize() = 0;
43 virtual void Deinitialize() = 0;
45 virtual bool IsInitialized() const = 0;
46
50
52 virtual const plHMDInfo& GetHmdInfo() const = 0;
53
55 virtual plXRInputDevice& GetXRInput() const = 0;
56
60
62 virtual bool SupportsCompanionView() = 0;
63
68 virtual plUniquePtr<plActor> CreateActor(plView* pView, plGALMSAASampleCount::Enum msaaCount = plGALMSAASampleCount::None, plUniquePtr<plWindowBase> pCompanionWindow = nullptr, plUniquePtr<plWindowOutputTargetGAL> pCompanionWindowOutput = nullptr) = 0;
69
73
77
79 virtual void OnActorDestroyed() = 0;
80
82};
A camera class that stores the orientation and some basic camera settings.
Definition Camera.h:41
Definition RendererFoundationDLL.h:411
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
Definition Declarations.h:64
Encapsulates a view on the given world through the given camera and rendered with the specified Rende...
Definition View.h:21
Base class of all window classes that have a client area and a native window handle.
Definition Window.h:134
Base class for window output targets.
Definition WindowOutputTargetBase.h:16
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
Definition XRInputDevice.h:49
XR singleton interface. Needs to be initialized to be used for VR or AR purposes.
Definition XRInterface.h:29
virtual void OnActorDestroyed()=0
Called when the actor created by 'CreateActor' is destroyed.
virtual const plHMDInfo & GetHmdInfo() const =0
Returns general HMD information.
virtual plXRInputDevice & GetXRInput() const =0
Returns the XR input device.
virtual bool SupportsCompanionView()=0
Returns true if a companion window can be passed into CreateActor.
virtual plGALTextureHandle GetCurrentTexture()=0
Called by plWindowOutputTargetXR::RenderCompanionView Returns the color texture to be used by the com...
virtual bool IsHmdPresent() const =0
Returns whether an HMD is available. Can be used to decide whether it makes sense to call Initialize ...
virtual plUniquePtr< plActor > CreateActor(plView *pView, plGALMSAASampleCount::Enum msaaCount=plGALMSAASampleCount::None, plUniquePtr< plWindowBase > pCompanionWindow=nullptr, plUniquePtr< plWindowOutputTargetGAL > pCompanionWindowOutput=nullptr)=0
Creates a XR actor by trying to startup an XR session.
virtual bool IsInitialized() const =0
Returns whether the XR system is initialized.
virtual void Deinitialize()=0
Shuts down the XR system again.
virtual plResult Initialize()=0
Initializes the XR system. This can be quite time consuming as it will generally start supporting app...
Definition Declarations.h:9
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54