FXRTrackingSystemBase

Base utility class for implementations of the [IXRTrackingSystem](API\Runtime\HeadMountedDisplay\IXRTrackingSystem) interface Contains helpers and default implementation of most abstract methods, so final implementations only need to override features that they support.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

HeadMountedDisplay

Header

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

Include

#include "XRTrackingSystemBase.h"

Syntax

class FXRTrackingSystemBase : public IXRTrackingSystem

Remarks

Base utility class for implementations of the IXRTrackingSystem interface Contains helpers and default implementation of most abstract methods, so final implementations only need to override features that they support.

Variables

Name Description

Protected variable

FTransform

 

CachedTrackingToWorld

Protected variable

FTransform

 

CalibratedOffset

If the tracker is trying to lock itself to an external tracking source for drift control, this stores the calibrated offset between the external tracking system and the internal tracking system (e.g. a location from a mocap system tracker to the HMD's internal IMU).

Protected variable

IXRLoadingScree...

 

LoadingScreen

Protected variable

TSharedPtr< cla...

 

XRCamera

Constructors

Name Description

Public function

FXRTrackingSystemBase

(
    IARSystemSupport* InARImplemen...
)

Destructors

Name Description

Public function Virtual

~FXRTrackingSystemBase()

Functions

Name Description

Protected function Const

FTransform

 

ComputeTrackingToWorldTransform

(
    FWorldContext& WorldContext
)

Protected function Virtual

IXRLoadingSc...

 

CreateLoadingScreen()

Override this method if you need to customize the IXRLoadingScreen implementation.

Public function

TSharedPtr< ...

 

GetARCompositionComponent()

Public function Const

const TShare...

 

GetARCompositionComponent()

Protected function Virtual

void

 

OnTrackingOriginChanged()

Meant to be called by sub-classes whenever the tracking origin is altered.

Protected function

FTransform

 

RefreshTrackingToWorldTransform

(
    FWorldContext& WorldContext
)

Computes the project's tracking-to-world transform based off how the user has set up their camera system (assumes the camera is parented to the XR origin, and in turn uses that transform).

Overridden from IXRTrackingSystem

Name Description

Public function Virtual

void

 

CalibrateExternalTrackingSource

(
    const FTransform& ExternalTracking...
)

Called to calibrate the offset transform between an external tracking source and the internal tracking source (e.g. mocap tracker to and HMD tracker).

Public function Virtual

bool

 

ConfigureGestures

(
    const FXRGestureConfig& GestureCon...
)

Public function Virtual

uint32

 

CountTrackedDevices

(
    EXRTrackedDeviceType Type
)

Get the count of tracked devices.

Public function Virtual Const

bool

 

DoesSupportPositionalTracking()

Whether or not the system supports positional tracking (either via sensor or other means).

Public function Virtual Const

bool

 

GetFloorToEyeTrackingTransform

(
    FTransform& OutFloorToEye
)

Returns a transform for converting from 'Floor' origin space to 'Eye' origin space.

Public function Virtual

IXRLoadingSc...

 

GetLoadingScreen()

Access the loading screen interface associated with this tracking system, if any.

Public function Virtual

void

 

GetMotionControllerData

(
    UObject* WorldContext,
    const EControllerHand Hand,
    FXRMotionControllerData& MotionCon...
)

Platform Agnostic Query about MotionControllers details

Public function Virtual

bool

 

GetRelativeEyePose

(
    int32 DeviceId,
    EStereoscopicPass Eye,
    FQuat& OutOrientation,
    FVector& OutPosition
)

If the device id represents a head mounted display, fetches the relative position of the given eye relative to the eye.

Public function Virtual

FString

 

GetTrackedDevicePropertySerialNumber

(
    int32 DeviceId
)

If the device id represents a tracking sensor, reports the serial number as a string if the device supports it.

Public function Virtual Const

EXRTrackedDe...

 

GetTrackedDeviceType

(
    int32 DeviceId
)

If the device id represents a tracking sensor, reports the device type.

Public function Virtual Const

EHMDTracking...

 

GetTrackingOrigin()

Returns current tracking origin.

The default implementation always reports 'eye'-level tracking.

Public function Virtual

bool

 

GetTrackingSensorProperties

(
    int32 DeviceId,
    FQuat& OutOrientation,
    FVector& OutPosition,
    FXRSensorProperties& OutSensorProp...
)

If the device id represents a tracking sensor, reports the frustum properties in game-world space of the sensor.

Public function Virtual Const

FTransform

 

GetTrackingToWorldTransform()

Returns the system's latest known tracking-to-world transform.

Public function Virtual Const

FString

 

GetVersionString()

Returns version string.

Public function Virtual

TSharedPtr< ...

 

GetXRCamera

(
    int32 DeviceId
)

Get the IXCamera instance for the given device.

Public function Virtual

bool

 

HasValidTrackingPosition()

If the system currently has valid tracking positions.

Public function Virtual

bool

 

IsTracking

(
    int32 DeviceId
)

Check current tracking status of a device.

Public function Virtual

void

 

SetTrackingOrigin

(
    EHMDTrackingOrigin::Type NewOrigin
)

Sets tracking origin (either 'eye'-level or 'floor'-level).

Public function Virtual

void

 

UpdateExternalTrackingPosition

(
    const FTransform& ExternalTracking...
)

Called after calibration to attempt to pull the internal tracker (e.g. HMD tracking) in line with the external tracker (e.g. mocap tracker).

Public function Virtual

void

 

UpdateTrackingToWorldTransform

(
    const FTransform& TrackingToWorldO...
)

Refreshes the system's known tracking-to-world transform.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss