Navigation
API > API/Runtime > API/Runtime/HeadMountedDisplay
Inheritance Hierarchy
- IModularFeature
- IXRSystemIdentifier
- IXRTrackingSystem
- FXRTrackingSystemBase
- FHeadMountedDisplayBase
- FPixelStreamingHMD
- FXRTrackingProxy
References
| Module | HeadMountedDisplay |
| Header | /Engine/Source/Runtime/HeadMountedDisplay/Public/IXRTrackingSystem.h |
| Include | #include "IXRTrackingSystem.h" |
Syntax
class IXRTrackingSystem :
public IModularFeature,
public IXRSystemIdentifier
Remarks
Main access point to an XR tracking system. Use it to enumerate devices and query their poses.
Functions
| Type | Name | Description | |
|---|---|---|---|
| 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). | |
| EXRDeviceConnectionResult::Type | ConnectRemoteXRDevice
(
const FString& IpAddress, |
||
| uint32 | CountTrackedDevices
(
EXRTrackedDeviceType Type |
Get the count of tracked devices | |
| void | |||
| bool | Return true if the default camera implementation should query the current projection matrix at the start of the render frame and apply late update. | ||
| bool | Return true if the default camera implementation should query the current pose at the start of the render frame and apply late update. | ||
| bool | Whether or not the system supports positional tracking (either via sensor or other means) | ||
| bool | EnumerateTrackedDevices
(
TArray< int32 >& OutDevices, |
Reports all devices currently available to the system, optionally limiting the result to a given class of devices. | |
| TSharedPtr< FARSupportInterface, ESPMode::ThreadSafe > | Access optionsal ARCompositionComponent | ||
| const TSharedPtr< const FARSupportInterface, ESPMode::ThreadSafe > | |||
| FVector | GetAudioListenerOffset
(
int32 DeviceId |
Get the offset, in device space, of the reported device (screen / eye) position to the center of the head. | |
| FQuat | Returns current base orientation of HMD as a quaternion. | ||
| FVector | Returns current base position of HMD. | ||
| FRotator | Returns current base orientation of HMD as yaw-pitch-roll combination. | ||
| bool | GetCurrentInteractionProfile
(
const EControllerHand Hand, |
||
| bool | GetCurrentPose
(
int32 DeviceId, |
Get the current pose for a device. | |
| bool | GetFloorToEyeTrackingTransform
(
FTransform& OutFloorToEye |
Computes a transform to convert from 'Floor' origin space to 'Eye' origin space. | |
| void | GetHMDData
(
UObject* WorldContext, |
Platform Agnostic Query about HMD details | |
| IHeadMountedDisplay * | GetHMDDevice () |
Access HMD rendering-related features. | |
| IXRLoadingScreen * | Access the loading screen interface associated with this tracking system, if any. | ||
| FName | |||
| void | GetMotionControllerData
(
UObject* WorldContext, |
Platform Agnostic Query about MotionControllers details | |
| 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 | |
| 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 | |
| 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. | |
| TSharedPtr< class IStereoRendering, ESPMode::ThreadSafe > | Access Stereo rendering device associated with this XR system. | ||
| FString | GetTrackedDevicePropertySerialNumber
(
int32 DeviceId |
If the device id represents a tracking sensor, reports the serial number as a string if the device supports it. | |
| EXRTrackedDeviceType | GetTrackedDeviceType
(
int32 DeviceId |
If the device id represents a tracking sensor, reports the device type. | |
| EHMDTrackingOrigin::Type | Returns current tracking origin. | ||
| bool | GetTrackingOriginTransform
(
TEnumAsByte< EHMDTrackingOrigin::Type > Origin, |
Get the transform of the specified tracking origin, if available. | |
| bool | GetTrackingSensorProperties
(
int32 DeviceId, |
If the device id represents a tracking sensor, reports the frustum properties in game-world space of the sensor. | |
| FTransform | Returns the system's latest known tracking-to-world transform. | ||
| FString | Returns version string. | ||
| float | This method should return the world to meters scale for the current frame. | ||
| TSharedPtr< class IXRCamera, ESPMode::ThreadSafe > | GetXRCamera
(
int32 DeviceId |
Get the IXCamera instance for the given device. | |
| IXRInput * | GetXRInput () |
Access optional HMD input override interface. | |
| int32 | Returns device specific flags. | ||
| bool | If the system currently has valid tracking positions. If not supported at all, returns false. | ||
| bool | Returns true, if head tracking is allowed. | ||
| 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) | |
| bool | Can be used to enforce tracking even when stereo rendering is disabled. | ||
| bool | IsTracking
(
int32 DeviceId |
Check current tracking status of a device. | |
| void | OnBeginPlay
(
FWorldContext& InWorldContext |
This method is called when playing begins. Useful to reset all runtime values stored in the plugin. | |
| void | Called just before rendering the current frame on the game frame. | ||
| void | OnBeginRendering_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Called just before rendering the current frame on the render thread. | |
| bool | OnEndGameFrame
(
FWorldContext& WorldContext |
This method is called when game frame ends (called on a game thread). | |
| void | OnEndPlay
(
FWorldContext& InWorldContext |
This method is called when playing ends. Useful to reset all runtime values stored in the plugin. | |
| void | OnLateUpdateApplied_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Called just after the late update on the render thread passing back the current relative transform. | |
| bool | OnStartGameFrame
(
FWorldContext& WorldContext |
This method is called when new game frame begins (called on a game thread). | |
| void | RebaseObjectOrientationAndPosition
(
FVector& Position, |
Temporary method until Morpheus controller code has been refactored. | |
| void | ResetOrientation
(
float Yaw |
Resets orientation by setting roll and pitch to 0, assuming that current yaw is forward direction. | |
| 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). | |
| void | Resets position, assuming current position as a 'zero-point'. | ||
| void | SetBaseOrientation
(
const FQuat& BaseOrient |
Sets base orientation, assuming that this is forward direction. Position is not changed. | |
| void | SetBasePosition
(
const FVector& BasePosition |
Sets base position of the HMD. | |
| void | SetBaseRotation
(
const FRotator& BaseRot |
Sets base orientation by setting yaw, pitch, roll, assuming that this is forward direction. | |
| void | SetHeadTrackingEnforced
(
bool bEnabled |
Can be used to enforce tracking even when stereo rendering is disabled. | |
| void | SetTrackingOrigin
(
EHMDTrackingOrigin::Type NewOrigin |
Sets tracking origin (either 'eye'-level or 'floor'-level). | |
| 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). | |
| void | UpdateTrackingToWorldTransform
(
const FTransform& TrackingToWorldOverride |
Refreshes the system's known tracking-to-world transform. |
Constants
| Name | Description |
|---|---|
| HMDDeviceId | Device id 0 is reserved for an HMD. |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | ConfigureGestures
(
const FXRGestureConfig& GestureConfig |
The only implementation for this function was removed many UE releases ago. | |
| void | RefreshPoses () |
This functionality is no longer supported. |