Open 3D Engine OpenXRVk 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.
OpenXRVk::Session Class Referencefinal

Inherits XR::Session.

Public Member Functions

 AZ_CLASS_ALLOCATOR (Session, AZ::SystemAllocator)
 
 AZ_RTTI (Session, "{6C899F0C-9A3D-4D79-8E4F-92AFB67E5EB1}", XR::Session)
 
void LogReferenceSpaces ()
 Print out all the supported Reference space.
 
void HandleSessionStateChangedEvent (const XrEventDataSessionStateChanged &stateChangedEvent)
 Process session state when it is updated.
 
const XrEventDataBaseHeader * TryReadNextEvent ()
 Try and poll the next event.
 
XrSession GetXrSession () const
 Return the native session.
 
XrSpace GetXrSpace (SpaceType spaceType) const
 Return the Xrspace related to the SpaceType enum.
 
const AZStd::vector< XrView > & GetXrViews () const
 
XrSpace GetViewSpaceXrSpace () const
 
void OnBeginFrame (XrTime predictedDisplayTime)
 
void SetBaseSpaceTypeForVisualization (SpaceType spaceType)
 
void SetBaseSpaceTypeForControllers (SpaceType spaceType)
 
SpaceType GetBaseSpaceTypeForVisualization () const
 
SpaceType GetBaseSpaceTypeForControllers () const
 
bool IsSessionRunning () const override
 
bool IsSessionFocused () const override
 
bool IsRestartRequested () const override
 
bool IsExitRenderLoopRequested () const override
 
void PollEvents () override
 
void LocateControllerSpace (AZ::u32 handIndex) override
 
AZ::RHI::ResultCode GetControllerPose (AZ::u32 handIndex, AZ::RPI::PoseData &outPoseData) const override
 
AZ::RHI::ResultCode GetControllerTransform (AZ::u32 handIndex, AZ::Transform &outTransform) const override
 
AZ::RHI::ResultCode GetControllerStagePose (AZ::u32 handIndex, 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
 
float GetControllerScale (AZ::u32 handIndex) const 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
 

Static Public Member Functions

static XR::Ptr< SessionCreate ()
 

Member Function Documentation

◆ OnBeginFrame()

void OpenXRVk::Session::OnBeginFrame ( XrTime  predictedDisplayTime)

Called by a Device when the predicted display time has been updated (typically the device updates the predicted display time during BeginFrame). See OpenXRVkInput.h UpdateXrSpaceLocations(...) for more details.

◆ SetBaseSpaceTypeForVisualization()

void OpenXRVk::Session::SetBaseSpaceTypeForVisualization ( SpaceType  spaceType)

Setters and Getters for the base spaces that will be used when calling xrLocateSpace(). By default, the base space for visualization is SpaceType::Local and the base space for Joysticks/controllers is SpaceType::View (aka the Head)


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