UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IXRCamera Class Referenceabstract

#include <IXRCamera.h>

+ Inheritance diagram for IXRCamera:

Public Member Functions

 IXRCamera ()
 
virtual void UseImplicitHMDPosition (bool bInImplicitHMDPosition)=0
 
virtual bool GetUseImplicitHMDPosition () const =0
 
virtual void ApplyHMDRotation (APlayerController *PC, FRotator &ViewRotation)=0
 
virtual bool UpdatePlayerCamera (FQuat &CurrentOrientation, FVector &CurrentPosition, float DeltaTime)=0
 
virtual void OverrideFOV (float &InOutFOV)=0
 
virtual void SetupLateUpdate (const FTransform &ParentToWorld, USceneComponent *Component, bool bSkipLateUpdate)=0
 
virtual void CalculateStereoCameraOffset (const int32 ViewIndex, FRotator &ViewRotation, FVector &ViewLocation)=0
 
virtual bool GetPassthroughCameraUVs_RenderThread (TArray< FVector2D > &OutUVs)
 
- Public Member Functions inherited from IIdentifiableXRDevice
virtual int32 GetSystemDeviceId () const =0
 
- Public Member Functions inherited from IXRSystemIdentifier
virtual FName GetSystemName () const =0
 

Detailed Description

Interface used by the camera component to figure out the final position of a motion tracked camera.

To reduce duplicated code, implementations should use the FXRCameraBase instead of implementing this interface directly.

Constructor & Destructor Documentation

◆ IXRCamera()

IXRCamera::IXRCamera ( )
inline

Member Function Documentation

◆ ApplyHMDRotation()

virtual void IXRCamera::ApplyHMDRotation ( APlayerController PC,
FRotator ViewRotation 
)
pure virtual

Optionally called by APlayerController to apply the orientation of the headset to the PC's rotation. If this is not done then the PC will face differently than the camera, which might be good (depending on the game).

◆ CalculateStereoCameraOffset()

virtual void IXRCamera::CalculateStereoCameraOffset ( const int32  ViewIndex,
FRotator ViewRotation,
FVector ViewLocation 
)
pure virtual

Calculates the offset for the camera position, given the specified eye pass, position and rotation. An XR plugin implementing stereo rendering should forward all calls of CalculateStereoViewOffset to this method.

◆ GetPassthroughCameraUVs_RenderThread()

virtual bool IXRCamera::GetPassthroughCameraUVs_RenderThread ( TArray< FVector2D > &  OutUVs)
inlinevirtual

Fetches the UV coordinates of an AR passthrough camera relative to the screen. Takes into account cropping, orientation and difference between camera and screen aspect ratios. Returns false if the UVs are not available or if the feature is not supported or implemented by the current platform. If the result is true, OutUVs will contain the four corner UVs of the passthrough camera rectangle.

This method should only be called from the render thread.

◆ GetUseImplicitHMDPosition()

virtual bool IXRCamera::GetUseImplicitHMDPosition ( ) const
pure virtual

Gets the view offset mode to assume an implied HMD position

◆ OverrideFOV()

virtual void IXRCamera::OverrideFOV ( float InOutFOV)
pure virtual

Override the Field of View for the player camera component.

◆ SetupLateUpdate()

virtual void IXRCamera::SetupLateUpdate ( const FTransform ParentToWorld,
USceneComponent *  Component,
bool  bSkipLateUpdate 
)
pure virtual

Setup state for applying the render thread late update

◆ UpdatePlayerCamera()

virtual bool IXRCamera::UpdatePlayerCamera ( FQuat CurrentOrientation,
FVector CurrentPosition,
float  DeltaTime 
)
pure virtual

Apply the orientation and position of the headset to the Camera.

◆ UseImplicitHMDPosition()

virtual void IXRCamera::UseImplicitHMDPosition ( bool  bInImplicitHMDPosition)
pure virtual

Set the view offset mode to assume an implied HMD position


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