UOculusFunctionLibrary

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

OculusHMD

Header

/Engine/Plugins/Runtime/Oculus/OculusVR/Source/OculusHMD/Public/OculusFunctionLibrary.h

Include

#include "OculusFunctionLibrary.h"

Syntax

UCLASS()
class UOculusFunctionLibrary : public UBlueprintFunctionLibrary

Constructors

Name Description

Public function

UOculusFunctionLibrary

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

AddLoadingSplashScreen

(
    UTexture2D* Texture,
    FVector TranslationInMeters,
    FRotator Rotation,
    FVector2D SizeInMeters,
    FRotator DeltaRotation,
    bool bClearBeforeAdd
)

Adds loading splash screen with parameters

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

ClearLoadingSplashScreens()

Removes all the splash screens.

Public function Static UFunction BlueprintCallable, Category

void

 

EnableOrientationTracking

(
    bool bOrientationTracking
)

Enables/disables orientation tracking on devices that support it.

Public function Static UFunction BlueprintCallable, Category

void

 

EnablePositionTracking

(
    bool bPositionTracking
)

Enables/disables positional tracking on devices that support it.

Public function Static UFunction BlueprintPure, Category

TArray< floa...

 

GetAvailableDisplayFrequencies()

Returns the current available frequencies

Public function Static UFunction BlueprintPure, Category

void

 

GetBaseRotationAndBaseOffsetInMeters

(
    FRotator& OutRotation,
    FVector& OutBaseOffsetInMeters
)

Returns current base rotation and base offset.

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

GetBaseRotationAndPositionOffset

(
    FRotator& OutRot,
    FVector& OutPosOffset
)

Returns current base rotation and position offset.

Public function Static UFunction BlueprintPure, Category

float

 

GetCurrentDisplayFrequency()

Returns the current display frequency

Public function Static UFunction BlueprintPure, Category

EOculusDevic...

 

GetDeviceType()

Public function Static UFunction BlueprintPure, Category

EFixedFoveat...

 

GetFixedFoveatedRenderingLevel()

Returns the current multiresolution level

Public function Static UFunction BlueprintPure, Category

float

 

GetGPUFrameTime()

Returns the GPU frame time on supported mobile platforms (Go for now)

Public function Static UFunction BlueprintPure, Category

void

 

GetGPUUtilization

(
    bool& IsGPUAvailable,
    float& GPUUtilization
)

Returns the GPU utilization availability and value

Public function Static UFunction BlueprintPure, Category

FVector

 

GetGuardianDimensions

(
    EBoundaryType BoundaryType
)

Returns the dimensions in UE world space of the requested Boundary Type

Public function Static UFunction BlueprintPure, Category

TArray< FVec...

 

GetGuardianPoints

(
    EBoundaryType BoundaryType,
    bool UsePawnSpace
)

Returns the list of points in UE world space of the requested Boundary Type

Public function Static UFunction BlueprintPure, Category

EOculusColor...

 

GetHmdColorDesc()

Returns the color space of the target HMD

Public function Static UFunction BlueprintCallable, Category

FGuardianTes...

 

GetNodeGuardianIntersection

(
    ETrackedDeviceType DeviceType,
    EBoundaryType BoundaryType
)

Get the intersection result between a tracked device (HMD or controllers) and a guardian boundary

Protected function Static

OculusHMD::F...

 

GetOculusHMD()

For outer boundary only.

Public function Static UFunction BlueprintPure, Category

FTransform

 

GetPlayAreaTransform()

Returns the transform of the play area rectangle, defining its position, rotation and scale to apply to a unit cube to match it with the play area.

Public function Static UFunction BlueprintCallable, Category

FGuardianTes...

 

GetPointGuardianIntersection

(
    const FVector Point,
    EBoundaryType BoundaryType
)

Get the intersection result between a UE coordinate and a guardian boundary

Public function Static UFunction BlueprintPure, Category

void

 

GetPose

(
    FRotator& DeviceRotation,
    FVector& DevicePosition,
    FVector& NeckPosition,
    bool bUseOrienationForPlayerCamera,
    bool bUsePositionForPlayerCamera,
    const FVector PositionScale
)

Grabs the current orientation and position for the HMD.

Public function Static UFunction BlueprintPure, Category

void

 

GetRawSensorData

(
    FVector& AngularAcceleration,
    FVector& LinearAcceleration,
    FVector& AngularVelocity,
    FVector& LinearVelocity,
    float& TimeInSeconds,
    ETrackedDeviceType DeviceType
)

Reports raw sensor data. If HMD doesn't support any of the parameters then it will be set to zero.

Public function Static

IStereoLayer...

 

GetStereoLayers()

Returns IStereoLayers interface to work with overlays.

Public function Static UFunction BlueprintPure, Category

bool

 

GetSystemHmd3DofModeEnabled()

Returns true if system headset is in 3dof mode

Public function Static UFunction BlueprintPure, Category

bool

 

GetUserProfile

(
    FHmdUserProfile& Profile
)

Returns current user profile.

Public function Static UFunction BlueprintPure, Category

bool

 

HasInputFocus()

Returns true, if the app has input focus.

Public function Static UFunction BlueprintPure, Category

bool

 

HasSystemOverlayPresent()

Returns true, if the system overlay is present.

Public function Static UFunction BlueprintPure, Category

bool

 

IsDeviceTracked

(
    ETrackedDeviceType DeviceType
)

Returns if the device is currently tracked by the runtime or not.

Public function Static UFunction BlueprintPure, Category

bool

 

IsGuardianConfigured()

GUARDIAN API Returns true if the Guardian has been set up by the user, false if the user is in "seated" mode and has not set up a play space.

Public function Static UFunction BlueprintPure, Category

bool

 

IsGuardianDisplayed()

GUARDIAN API Returns true if the Guardian Outer Boundary is being displayed

Public function Static UFunction BlueprintCallable, Category

void

 

SetBaseRotationAndBaseOffsetInMeters

(
    FRotator Rotation,
    FVector BaseOffsetInMeters,
    EOrientPositionSelector::Type Optio...
)

Sets 'base rotation' - the rotation that will be subtracted from the actual HMD orientation.

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

SetBaseRotationAndPositionOffset

(
    FRotator BaseRot,
    FVector PosOffset,
    EOrientPositionSelector::Type Optio...
)

Sets 'base rotation' - the rotation that will be subtracted from the actual HMD orientation.

Public function Static UFunction BlueprintCallable, Category

void

 

SetClientColorDesc

(
    EOculusColorSpace ColorSpace
)

Sets the target HMD to do color space correction to a specific color space

Public function Static UFunction BlueprintCallable, Category

void

 

SetColorScaleAndOffset

(
    FLinearColor ColorScale,
    FLinearColor ColorOffset,
    bool bApplyToAllLayers
)

Set the Color Scale/Offset

Public function Static UFunction BlueprintCallable, Category

void

 

SetCPUAndGPULevels

(
    int CPULevel,
    int GPULevel
)

Returns if the device is currently tracked by the runtime or not.

Public function Static UFunction BlueprintCallable, Category

void

 

SetDisplayFrequency

(
    float RequestedFrequency
)

Sets the requested display frequency

Public function Static UFunction BlueprintCallable, Category

void

 

SetFixedFoveatedRenderingLevel

(
    EFixedFoveatedRenderingLevel level,
    bool isDynamic
)

Set the requested multiresolution level for the next frame, and whether FFR's level is now dynamic or not.

Public function Static UFunction BlueprintCallable, Category

void

 

SetGuardianVisibility

(
    bool GuardianVisible
)

Forces the runtime to render guardian at all times or not

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

SetPositionScale3D

(
    FVector PosScale3D
)

Scales the HMD position that gets added to the virtual camera position.

Typedefs

Name

Description

FOculusGuardianReturnedEvent

When player returns within outer bounds

FOculusGuardianTriggeredEvent

When player triggers the Guardian boundary

Deprecated Functions

Name Description

Public function Static UFunction BlueprintPure, Category, Meta

FString

 

GetDeviceName()

UOculusFunctionLibrary::GetDeviceName has been deprecated and no longer functions as before. Please use the enum-based GetDeviceType instead.