Open 3D Engine XR Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
XR::System Class Reference

#include <XRSystem.h>

Inherits AZ::RPI::XRRenderingInterface, AZ::RHI::XRRenderingInterface, AZ::SystemTickBus::Handler, AZStd::intrusive_base, AZ::RPI::PassSystemTemplateNotificationsBus::MultiHandler, and AzFramework::AssetCatalogEventBus::Handler.

Classes

struct  Descriptor
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (System, AZ::SystemAllocator)
 
 AZ_RTTI (System, "{C3E0291D-FB30-4E27-AB0D-14606A8C3C1F}")
 
 AZ_DISABLE_COPY_MOVE (System)
 
void Init (const Descriptor &descriptor)
 Init the XRSystem.
 
void Shutdown ()
 Destroy any relevant objects held by this .class.
 
void OnSystemTick () override
 Handle XR events and actions.
 
AZ::RHI::ResultCode InitInstance () override
 
void AcquireSwapChainImage (AZ::u32 viewIndex) override
 
AZ::u32 GetNumViews () const override
 
AZ::RHI::ResultCode GetSwapChainImage (AZ::RHI::XRSwapChainDescriptor *swapchainDescriptor) const override
 
AZ::u32 GetSwapChainWidth (AZ::u32 viewIndex) const override
 
AZ::u32 GetSwapChainHeight (AZ::u32 viewIndex) const override
 
AZ::RHI::Format GetSwapChainFormat (AZ::u32 viewIndex) const override
 
AZ::RHI::ResultCode GetViewFov (AZ::u32 viewIndex, AZ::RPI::FovData &outFovData) const override
 
AZ::RHI::ResultCode GetViewPose (AZ::u32 viewIndex, AZ::RPI::PoseData &outPoseData) const override
 
AZ::RHI::ResultCode GetViewFrontPose (AZ::RPI::PoseData &outPoseData) const override
 
AZ::RHI::ResultCode GetViewLocalPose (AZ::RPI::PoseData &outPoseData) const override
 
AZ::RHI::ResultCode GetControllerStagePose (AZ::u32 handIndex, AZ::RPI::PoseData &outPoseData) const override
 
AZ::RHI::ResultCode GetControllerPose (AZ::u32 handIndex, AZ::RPI::PoseData &outPoseData) const override
 
AZ::RHI::ResultCode GetControllerTransform (const AZ::u32 handIndex, AZ::Transform &outTransform) const override
 
float GetControllerScale (AZ::u32 handIndex) const override
 
bool ShouldRender () const override
 
AZ::Matrix4x4 CreateStereoscopicProjection (float angleLeft, float angleRight, float angleBottom, float angleTop, float nearDist, float farDist, bool reverseDepth) override
 
AZ::RHI::XRRenderingInterface * GetRHIXRRenderingInterface () override
 
float GetXButtonState () const override
 
float GetYButtonState () const override
 
float GetAButtonState () const override
 
float GetBButtonState () const override
 
float GetXJoyStickState (AZ::u32 handIndex) const override
 
float GetYJoyStickState (AZ::u32 handIndex) const override
 
float GetSqueezeState (AZ::u32 handIndex) const override
 
float GetTriggerState (AZ::u32 handIndex) const override
 
AZ::u32 GetNumPhysicalDevices () const override
 
AZ::RHI::ResultCode GetXRPhysicalDevice (AZ::RHI::XRPhysicalDeviceDescriptor *physicalDeviceDescriptor, int32_t index) override
 
AZ::RHI::ResultCode CreateDevice (AZ::RHI::XRDeviceDescriptor *deviceDescriptor) override
 
AZ::RHI::ResultCode CreateSession (AZ::RHI::XRSessionDescriptor *sessionDescriptor) override
 
AZ::RHI::ResultCode CreateSwapChain () override
 
AZ::u32 GetCurrentImageIndex (AZ::u32 viewIndex) const override
 
void BeginFrame () override
 
void EndFrame () override
 
void PostFrame () override
 
bool IsDefaultRenderPipelineNeeded () const override
 
bool IsDefaultRenderPipelineEnabledOnHost () const override
 
AZ::RHI::ResultCode InitVariableRateShadingImageContent (AZ::RHI::Image *image, AZ::RHI::XRFoveatedLevel type) const override
 
void OnCatalogLoaded (const char *) override
 
void OnAddingPassTemplate (const AZStd::shared_ptr< AZ::RPI::PassTemplate > &passTemplate) override
 

Detailed Description

This class is the window to everything XR related. It implements RPI::RenderingInterface and RHI::RenderingInterface but can be extended to implement other non rendering interfaces if needed.


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