Navigation
API > API/Plugins > API/Plugins/XRBase
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UBlueprintFunctionLibrary
- UHeadMountedDisplayFunctionLibrary
References
| Module | XRBase |
| Header | /Engine/Plugins/Runtime/XRBase/Source/XRBase/Public/HeadMountedDisplayFunctionLibrary.h |
| Include | #include "HeadMountedDisplayFunctionLibrary.h" |
Syntax
UCLASS&40;&41;
class UHeadMountedDisplayFunctionLibrary : public UBlueprintFunctionLibrary
Constructors
| Type | Name | Description | |
|---|---|---|---|
UHeadMountedDisplayFunctionLibrary
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Breaks an XR key apart into the interaction profile, handedness, motion source, indentifier and component. | ||
| void | CalibrateExternalTrackingToHMD
(
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). | |
| void | ClearXRTimedInputActionDelegate
(
const FName& ActionPath |
||
| bool | ConfigureGestures
(
const FXRGestureConfig& GestureConfig |
||
| EXRDeviceConnectionResult::Type | ConnectRemoteXRDevice
(
const FString& IpAddress, |
Connect to a remote deviceConnect to a remote device for Remote Debugging | |
| void | Disconnect remote AR Device | ||
| bool | EnableHMD
(
bool bEnable |
Switches to/from using HMD and stereo rendering. | |
| void | EnableLowPersistenceMode
(
bool bEnable |
Switches between low and full persistence modes. | |
| TArray< FXRDeviceId > | EnumerateTrackedDevices
(
const FName SystemId, |
Cross XR-System query that will list all XR devices currently being tracked. | |
| bool | GetControllerTransformForTime
(
UObject* WorldContext, |
Get the transform and potentially velocity data at a specified time near the current frame in unreal world space. | |
| bool | GetControllerTransformForTime2
(
UObject* WorldContext, |
Get the transform and potentially velocity data at a specified time near the current frame in unreal world space. | |
| bool | GetCurrentInteractionProfile
(
const EControllerHand Hand, |
Get the openXR interaction profile name for the given controller. | |
| void | GetDevicePose
(
const FXRDeviceId& XRDeviceId, |
Cross XR-System query that returns a specific device's tracked position and orientation (in tracking space). | |
| void | GetDeviceWorldPose
(
UObject* WorldContext, |
Cross XR-System query that returns a specific device's position and orientation in world space. | |
| void | GetHMDData
(
UObject* WorldContext, |
Cross XR-System query that returns critical information about the HMD display (position, orientation, device name) | |
| FName | Returns the name of the device, so scripts can modify their behaviour appropriately | ||
| EHMDWornState::Type | Returns the worn state of the device. | ||
| void | GetMotionControllerData
(
UObject* WorldContext, |
Cross XR-System query that returns critical information about the motion controller (position, orientation, hand/finger position) | |
| int32 | If the HMD has multiple positional tracking sensors, return a total number of them currently connected. | ||
| void | GetOrientationAndPosition
(
FRotator& DeviceRotation, |
Grabs the current orientation and position for the HMD. | |
| float | Returns the current VR pixel density. | ||
| FVector2D | GetPlayAreaBounds
(
TEnumAsByte< 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 playable area rectangle. | |
| void | GetPositionalTrackingCameraParameters
(
FVector& CameraOrigin, |
If the HMD has a positional sensor, this will return the game-world location of it, as well as the parameters for the bounding region of tracking. | |
| TEnumAsByte< EHMDTrackingOrigin::Type > | Returns current tracking origin type (eye level or floor level). | ||
| bool | GetTrackingOriginTransform
(
TEnumAsByte< EHMDTrackingOrigin::Type > Origin, |
Get the transform of the specified tracking origin, if available. | |
| void | GetTrackingSensorParameters
(
FVector& Origin, |
If the HMD has a positional sensor, this will return the game-world location of it, as well as the parameters for the bounding region of tracking. | |
| FTransform | GetTrackingToWorldTransform
(
UObject* WorldContext |
Returns a transform that can be used to convert points from tracking space to world space. | |
| FString | Returns name of tracking system specific version string. | ||
| void | GetVRFocusState
(
bool& bUseFocus, |
Returns current state of VR focus. | |
| float | GetWorldToMetersScale
(
UObject* WorldContext |
Returns the World to Meters scale, which corresponds to the scale of the world as perceived by the player | |
| int32 | Returns the flags for the device, so scripts can modify their behaviour appropriately | ||
| bool | If the HMD supports positional tracking, whether or not we are currently being tracked | ||
| bool | IsDeviceTracking
(
const FXRDeviceId& XRDeviceId |
Cross XR-System query that returns whether the specified device is tracked or not. | |
| bool | Returns whether or not the HMD hardware is connected and ready to use. | ||
| bool | Returns whether or not we are currently using the head mounted display. | ||
| bool | Returns true, if HMD is in low persistence mode. 'false' otherwise. | ||
| bool | Return true if spectator screen mode control is available. | ||
| 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 | SetClippingPlanes
(
float Near, |
Sets near and far clipping planes (NCP and FCP) for stereo rendering. | |
| void | SetSpectatorScreenMode
(
ESpectatorScreenMode Mode |
Sets the social screen mode. | |
| void | SetSpectatorScreenModeTexturePlusEyeLayout
(
FVector2D EyeRectMin, |
Setup the layout for ESpectatorScreenMode::TexturePlusEye. | |
| void | SetSpectatorScreenTexture
(
UTexture* InTexture |
Change the texture displayed on the social screen | |
| void | SetTrackingOrigin
(
TEnumAsByte< EHMDTrackingOrigin::Type > Origin |
Sets current tracking origin type (eye level or floor level). | |
| void | SetWorldToMetersScale
(
UObject* WorldContext, |
Sets the World to Meters scale, which changes the scale of the world as perceived by the player | |
| void | SetXRDisconnectDelegate
(
const FXRDeviceOnDisconnectDelegate& InDisconnectedDelegate |
||
| void | SetXRTimedInputActionDelegate
(
const FName& ActionName, |
Hook up a delegate to get an OpenXR action event with action time. | |
| void | UpdateExternalTrackingHMDPosition
(
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). |
Constants
| Name | Description |
|---|---|
| OnXRDeviceOnDisconnectDelegate | |
| OnXRTimedInputActionDelegateMap |