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

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
)

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

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

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 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.

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