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

Inherits XR::Object.

Classes

struct  Descriptor
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (Session, AZ::SystemAllocator)
 
 AZ_RTTI (Session, "{E7276FE1-94B8-423A-9C1D-1BCF1A0066BC}")
 
AZ::RHI::ResultCode Init (const Descriptor &descriptor)
 
const Descriptor & GetDescriptor () const
 Get the descriptor for the class.
 
Input * GetInput () const
 Get the Xr Input object.
 
Space * GetSpace () const
 Get the Xr Space object.
 
virtual bool IsSessionRunning () const =0
 Return true if session is running.
 
virtual bool IsSessionFocused () const =0
 Return true if session is focused.
 
virtual bool IsRestartRequested () const =0
 Return true if a restart is requested.
 
virtual bool IsExitRenderLoopRequested () const =0
 Return true if render loop skip is requested.
 
virtual void PollEvents ()=0
 Poll events and process the pending messages accordingly.
 
virtual void LocateControllerSpace (AZ::u32 handIndex)=0
 Allow the back-end to cache the controller space data.
 
virtual AZ::RHI::ResultCode GetControllerPose (AZ::u32 handIndex, AZ::RPI::PoseData &outPoseData) const =0
 Api to retrieve the controller space data.
 
virtual AZ::RHI::ResultCode GetControllerTransform (AZ::u32 handIndex, AZ::Transform &outTransform) const =0
 Same as above, but conveniently returns a transform.
 
virtual AZ::RHI::ResultCode GetControllerStagePose (AZ::u32 handIndex, AZ::RPI::PoseData &outPoseData) const =0
 Api to retrieve the controller space data associated with local view translated and rotated by 60 deg left or right based on handIndex.
 
virtual float GetControllerScale (AZ::u32 handIndex) const =0
 Api to retrieve the controller scale data.
 
virtual AZ::RHI::ResultCode GetViewFrontPose (AZ::RPI::PoseData &outPoseData) const =0
 Api to retrieve the front view space data.
 
virtual AZ::RHI::ResultCode GetViewLocalPose (AZ::RPI::PoseData &outPoseData) const =0
 Api to retrieve the local view space data.
 
virtual float GetXButtonState () const =0
 Api to retrieve the controller X button state.
 
virtual float GetYButtonState () const =0
 Api to retrieve the controller Y button state.
 
virtual float GetAButtonState () const =0
 Api to retrieve the controller A button state.
 
virtual float GetBButtonState () const =0
 Api to retrieve the controller B button state.
 
virtual float GetXJoyStickState (AZ::u32 handIndex) const =0
 Api to retrieve the joystick controller state related to x-axis.
 
virtual float GetYJoyStickState (AZ::u32 handIndex) const =0
 Api to retrieve the joystick controller state related to y-axis.
 
virtual float GetSqueezeState (AZ::u32 handIndex) const =0
 Api to retrieve the controller Y button state.
 
virtual float GetTriggerState (AZ::u32 handIndex) const =0
 Api to retrieve the controller Y button state.
 
- Public Member Functions inherited from XR::Object
 AZ_RTTI (Object, "{74FCA8BF-CBDA-43EB-A378-89F752ED2FCA}")
 
void SetName (const AZ::Name &name)
 Sets the name of the object.
 
const AZ::Name & GetName () const
 Returns the name set on the object by SetName.
 

Member Function Documentation

◆ Init()

AZ::RHI::ResultCode XR::Session::Init ( const Descriptor &  descriptor)

Initialize the XrSession object which is responsible for creating XrInput and XrSpace


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