Navigation
API > API/Runtime > API/Runtime/HeadMountedDisplay
Main access point to an XR tracking system. Use it to enumerate devices and query their poses.
| Name | IXRTrackingSystem |
| Type | class |
| Header File | /Engine/Source/Runtime/HeadMountedDisplay/Public/IXRTrackingSystem.h |
| Include Path | #include "IXRTrackingSystem.h" |
Syntax
class IXRTrackingSystem :
public IModularFeature,
public IXRSystemIdentifier
Implements Interfaces
Derived Classes
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| HMDDeviceId | const int32 | Device id 0 is reserved for an HMD. | IXRTrackingSystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CalibrateExternalTrackingSource
(
const FTransform& ExternalTrackingTransform |
Called to calibrate the offset transform between an external tracking source and the internal tracking source (e.g. mocap tracker to and HMD tracker). | IXRTrackingSystem.h | |
virtual EXRDeviceConnectionResult::Type ConnectRemoteXRDevice
(
const FString& IpAddress, |
IXRTrackingSystem.h | ||
uint32 CountTrackedDevices
(
EXRTrackedDeviceType Type |
Get the count of tracked devices | IXRTrackingSystem.h | |
virtual void DisconnectRemoteXRDevice() |
IXRTrackingSystem.h | ||
virtual bool DoesSupportLateProjectionUpdate () |
Return true if the default camera implementation should query the current projection matrix at the start of the render frame and apply late update. | IXRTrackingSystem.h | |
virtual bool DoesSupportLateUpdate () |
Return true if the default camera implementation should query the current pose at the start of the render frame and apply late update. | IXRTrackingSystem.h | |
bool DoesSupportPositionalTracking() |
Whether or not the system supports positional tracking (either via sensor or other means) | IXRTrackingSystem.h | |
bool EnumerateTrackedDevices
(
TArray< int32 >& OutDevices, |
Reports all devices currently available to the system, optionally limiting the result to a given class of devices. | IXRTrackingSystem.h | |
virtual const TSharedPtr< const FARSupportInterface, ESPMode::ThreadSafe > GetARCompositionComponent () |
IXRTrackingSystem.h | ||
virtual TSharedPtr< FARSupportInterface, ESPMode::ThreadSafe > GetARCompositionComponent () |
Access optionsal ARCompositionComponent | IXRTrackingSystem.h | |
virtual FVector GetAudioListenerOffset
(
int32 DeviceId |
Get the offset, in device space, of the reported device (screen / eye) position to the center of the head. | IXRTrackingSystem.h | |
virtual FQuat GetBaseOrientation() |
Returns current base orientation of HMD as a quaternion. | IXRTrackingSystem.h | |
virtual FVector GetBasePosition() |
Returns current base position of HMD. | IXRTrackingSystem.h | |
virtual FRotator GetBaseRotation() |
Returns current base orientation of HMD as yaw-pitch-roll combination. | IXRTrackingSystem.h | |
bool GetCurrentInteractionProfile
(
const EControllerHand Hand, |
IXRTrackingSystem.h | ||
bool GetCurrentPose
(
int32 DeviceId, |
Get the current pose for a device. | IXRTrackingSystem.h | |
bool GetFloorToEyeTrackingTransform
(
FTransform& OutFloorToEye |
Computes a transform to convert from 'Floor' origin space to 'Eye' origin space. | IXRTrackingSystem.h | |
void GetHandTrackingState
(
UObject* WorldContext, |
IXRTrackingSystem.h | ||
virtual void GetHMDData
(
UObject* WorldContext, |
Platform Agnostic Query about HMD details | IXRTrackingSystem.h | |
virtual IHeadMountedDisplay * GetHMDDevice() |
Access HMD rendering-related features. | IXRTrackingSystem.h | |
virtual IOpenXRHMD * GetIOpenXRHMD() |
Get the IOpenXRHMD interface, if there is one. | IXRTrackingSystem.h | |
virtual IXRLoadingScreen * GetLoadingScreen() |
Access the loading screen interface associated with this tracking system, if any. | IXRTrackingSystem.h | |
void GetMotionControllerData
(
UObject* WorldContext, |
Platform Agnostic Query about MotionControllers details | IXRTrackingSystem.h | |
void GetMotionControllerState
(
UObject* WorldContext, |
IXRTrackingSystem.h | ||
virtual FVector2D GetPlayAreaBounds
(
EHMDTrackingOrigin::Type Origin |
Get the bounds of the area where the user can freely move while remaining tracked centered around the specified origin | IXRTrackingSystem.h | |
virtual bool GetPlayAreaRect
(
FTransform& OutTransform, |
Get the transform and dimensions of the area where the user can freely move while remaining tracked centered around the specified origin transform | IXRTrackingSystem.h | |
bool GetRelativeEyePose
(
int32 DeviceId, |
If the device id represents a head mounted display, fetches the relative position of the given eye relative to the eye. | IXRTrackingSystem.h | |
virtual TSharedPtr< class IStereoRendering, ESPMode::ThreadSafe > GetStereoRenderingDevice () |
Access Stereo rendering device associated with this XR system. | IXRTrackingSystem.h | |
FString GetTrackedDevicePropertySerialNumber
(
int32 DeviceId |
If the device id represents a tracking sensor, reports the serial number as a string if the device supports it. | IXRTrackingSystem.h | |
EXRTrackedDeviceType GetTrackedDeviceType
(
int32 DeviceId |
If the device id represents a tracking sensor, reports the device type. | IXRTrackingSystem.h | |
EHMDTrackingOrigin::Type GetTrackingOrigin() |
Returns current tracking origin. | IXRTrackingSystem.h | |
virtual bool GetTrackingOriginTransform
(
TEnumAsByte< EHMDTrackingOrigin::Type > Origin, |
Get the transform of the specified tracking origin, if available. | IXRTrackingSystem.h | |
bool GetTrackingSensorProperties
(
int32 DeviceId, |
If the device id represents a tracking sensor, reports the frustum properties in game-world space of the sensor. | IXRTrackingSystem.h | |
FTransform GetTrackingToWorldTransform () |
Returns the system's latest known tracking-to-world transform. | IXRTrackingSystem.h | |
FString GetVersionString() |
Returns version string. | IXRTrackingSystem.h | |
float GetWorldToMetersScale () |
This method should return the world to meters scale for the current frame. | IXRTrackingSystem.h | |
TSharedPtr< class IXRCamera, ESPMode::ThreadSafe > GetXRCamera
(
int32 DeviceId |
Get the IXCamera instance for the given device. | IXRTrackingSystem.h | |
virtual IXRInput * GetXRInput () |
Deprecated, and will be removed in a future release. | IXRTrackingSystem.h | |
int32 GetXRSystemFlags() |
Returns device specific flags. | IXRTrackingSystem.h | |
bool HasValidTrackingPosition() |
If the system currently has valid tracking positions. If not supported at all, returns false. | IXRTrackingSystem.h | |
bool IsHeadTrackingAllowed () |
Returns true, if head tracking is allowed. | IXRTrackingSystem.h | |
virtual bool IsHeadTrackingAllowedForWorld
(
UWorld& World |
Same as IsHeadTrackingAllowed, but returns false if the World is not using VR (such as with the non-VR PIE instances when using VR Preview) | IXRTrackingSystem.h | |
virtual bool IsHeadTrackingEnforced () |
Can be used to enforce tracking even when stereo rendering is disabled. | IXRTrackingSystem.h | |
bool IsTracking
(
int32 DeviceId |
Check current tracking status of a device. | IXRTrackingSystem.h | |
virtual void OnBeginPlay
(
FWorldContext& InWorldContext |
This method is called when playing begins. Useful to reset all runtime values stored in the plugin. | IXRTrackingSystem.h | |
virtual void OnBeginRendering_GameThread
(
FSceneViewFamily& InViewFamily |
IXRTrackingSystem.h | ||
virtual void OnBeginRendering_GameThread () |
Called just before rendering the current frame on the game frame. | IXRTrackingSystem.h | |
virtual void OnBeginRendering_RenderThread
(
FRDGBuilder& GraphBuilder, |
IXRTrackingSystem.h | ||
virtual void OnBeginRendering_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Called just before rendering the current frame on the render thread. | IXRTrackingSystem.h | |
virtual bool OnEndGameFrame
(
FWorldContext& WorldContext |
This method is called when game frame ends (called on a game thread). | IXRTrackingSystem.h | |
virtual void OnEndPlay
(
FWorldContext& InWorldContext |
This method is called when playing ends. Useful to reset all runtime values stored in the plugin. | IXRTrackingSystem.h | |
virtual void OnLateUpdateApplied_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Called just after the late update on the render thread passing back the current relative transform. | IXRTrackingSystem.h | |
virtual void OnLateUpdateApplied_RenderThread
(
FRDGBuilder& GraphBuilder, |
IXRTrackingSystem.h | ||
virtual bool OnStartGameFrame
(
FWorldContext& WorldContext |
This method is called when new game frame begins (called on a game thread). | IXRTrackingSystem.h | |
virtual void RebaseObjectOrientationAndPosition
(
FVector& Position, |
Temporary method until Morpheus controller code has been refactored. | IXRTrackingSystem.h | |
virtual void ResetOrientation
(
float Yaw |
Resets orientation by setting roll and pitch to 0, assuming that current yaw is forward direction. | IXRTrackingSystem.h | |
void ResetOrientationAndPosition
(
float Yaw |
Resets orientation by setting roll and pitch to 0, assuming that current yaw is forward direction and assuming current position as a 'zero-point' (for positional tracking). | IXRTrackingSystem.h | |
virtual void ResetPosition() |
Resets position, assuming current position as a 'zero-point'. | IXRTrackingSystem.h | |
virtual void SetBaseOrientation
(
const FQuat& BaseOrient |
Sets base orientation, assuming that this is forward direction. Position is not changed. | IXRTrackingSystem.h | |
virtual void SetBasePosition
(
const FVector& BasePosition |
Sets base position of the HMD. | IXRTrackingSystem.h | |
virtual void SetBaseRotation
(
const FRotator& BaseRot |
Sets base orientation by setting yaw, pitch, roll, assuming that this is forward direction. | IXRTrackingSystem.h | |
virtual void SetHeadTrackingEnforced
(
bool bEnabled |
Can be used to enforce tracking even when stereo rendering is disabled. | IXRTrackingSystem.h | |
void SetTrackingOrigin
(
EHMDTrackingOrigin::Type NewOrigin |
Sets tracking origin (either 'eye'-level or 'floor'-level). | IXRTrackingSystem.h | |
virtual void UpdateExternalTrackingPosition
(
const FTransform& ExternalTrackingTransform |
Called after calibration to attempt to pull the internal tracker (e.g. HMD tracking) in line with the external tracker (e.g. mocap tracker). | IXRTrackingSystem.h | |
void UpdateTrackingToWorldTransform
(
const FTransform& TrackingToWorldOverride |
Refreshes the system's known tracking-to-world transform. | IXRTrackingSystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FName GetModularFeatureName() |
IXRTrackingSystem.h |