FDefaultXRCamera

Default base implementation of [IXRCamera](API\Runtime\HeadMountedDisplay\IXRCamera).

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

HeadMountedDisplay

Header

/Engine/Source/Runtime/HeadMountedDisplay/Public/DefaultXRCamera.h

Include

#include "DefaultXRCamera.h"

Syntax

class FDefaultXRCamera :
    public IXRCamera,
    public FSceneViewExtensionBase

Remarks

Default base implementation of IXRCamera. Can either be used directly by implementations or extended with platform-specific features.

Variables

Name Description

Protected variable

FQuat

 

DeltaControlOrientation

Protected variable

FRotator

 

DeltaControlRotation

Protected variable

const int32

 

DeviceId

Protected variable

IXRTrackingSyst...

 

TrackingSystem

Constructors

Name Description

Public function

FDefaultXRCamera

(
    const FAutoRegister&,
    IXRTrackingSystem* InTrackingS...,
    int32 InDeviceId
)

Destructors

Name Description

Public function Virtual

~FDefaultXRCamera()

Overridden from IXRCamera

Name Description

Public function Virtual

void

 

ApplyHMDRotation

(
    APlayerController* PC,
    FRotator& ViewRotation
)

Optionally called by APlayerController to apply the orientation of the headset to the PC's rotation.

Public function Virtual

void

 

CalculateStereoCameraOffset

(
    const enum EStereoscopicPass Stereo...,
    FRotator& ViewRotation,
    FVector& ViewLocation
)

Calculates the offset for the camera position, given the specified eye pass, position and rotation.

Public function Virtual Const

bool

 

GetUseImplicitHMDPosition()

Returns current setting controlling whether to assume an implied hmd position

Public function Virtual

void

 

OverrideFOV

(
    float& InOutFOV
)

Override the Field of View for the player camera component.

Public function Virtual

void

 

SetupLateUpdate

(
    const FTransform& ParentToWorld,
    USceneComponent* Component,
    bool bSkipLateUpdate
)

Setup state for applying the render thread late update

Public function Virtual

bool

 

UpdatePlayerCamera

(
    FQuat& CurrentOrientation,
    FVector& CurrentPosition
)

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

Public function Virtual

void

 

UseImplicitHMDPosition

(
    bool bInImplicitHMDPosition
)

Set the view offset mode to assume an implied HMD position

Overridden from IIdentifiableXRDevice

Name Description

Public function Virtual Const

int32

 

GetSystemDeviceId()

IIdentifiableXRDevice interface:

Overridden from IXRSystemIdentifier

Name Description

Public function Virtual Const

FName

 

GetSystemName()

Returns a unique identifier that's supposed to represent the third party system that this object is part of (Vive, Oculus, PSVR, Gear VR, etc.).

Overridden from ISceneViewExtension

Name Description

Public function Virtual

void

 

BeginRenderViewFamily

(
    FSceneViewFamily& InViewFamily
)

Called on game thread when view family is about to be rendered.

Public function Virtual Const

bool

 

IsActiveThisFrame

(
    FViewport* InViewport
)

Returning false disables the extension for the current frame.

Public function Virtual

void

 

PreRenderView_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FSceneView& InView
)

Called on render thread at the start of rendering, for each view, after PreRenderViewFamily_RenderThread call.

Public function Virtual

void

 

PreRenderViewFamily_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FSceneViewFamily& InViewFamily
)

Called on render thread at the start of rendering.

Public function Virtual

void

 

SetupView

(
    FSceneViewFamily& InViewFamily,
    FSceneView& InView
)

Called on game thread when creating the view.

Public function Virtual

void

 

SetupViewFamily

(
    FSceneViewFamily& InViewFamily
)

ISceneViewExtension interface:

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback