UOculusFunctionLibrary

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](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UOculusFunctionLibrary : public UBlueprintFunctionLibrary

Constructors

Name Description

Public function

UOculusFunctionLibrary

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Static UFunction BlueprintCallable, Category

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

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

FString

 

GetDeviceName()

Returns the current device's name

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

 

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

 

SetColorScaleAndOffset

(
    FLinearColor ColorScale,
    FLinearColor ColorOffset,
    bool bApplyToAllLayers
)

Enables/disables orientation tracking on devices that support it.

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

Set the requested multiresolution level for the next frame

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.

Public function Static UFunction BlueprintCallable, Category

void

 

SetReorientHMDOnControllerRecenter

(
    bool recenterMode
)

Sets the HMD recenter behavior to a mode that specifies HMD recentering behavior when a controller recenter is performed.

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 BlueprintCallable, Category, Meta

void

 

EnableAutoLoadingSplashScreen

(
    bool bAutoShowEnabled
)

UOculusFunctionLibrary::EnableAutoLoadingSplashScreen has been deprecated and no longer functions as before. Use the generic UStereoLayerFunctionLibrary::EnableAutoLoadingSplashScreen instead

Public function Static UFunction BlueprintPure, Category, Meta

void

 

GetLoadingSplashParams

(
    FString& TexturePath,
    FVector& DistanceInMeters,
    FVector2D& SizeInMeters,
    FVector& RotationAxis,
    float& RotationDeltaInDeg
)

UOculusFunctionLibrary::GetLoadingSplashParams has been deprecated and no longer functions as before. Please use the generic UStereoLayerFunctionLibrary instead.

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

HideLoadingIcon()

UOculusFunctionLibrary::HideLoadingIcon has been deprecated and no longer functions as before. Please use the generic UStereoLayerFunctionLibrary instead.

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

HideLoadingSplashScreen

(
    bool bClear
)

UOculusFunctionLibrary::HideLoadingSplashScreen has been deprecated and no longer functions as before. Use the generic UStereoLayerFunctionLibrary::HideSplashScreen instead

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

IsAutoLoadingSplashScreenEnabled()

UOculusFunctionLibrary::IsAutoLoadingSplashScreenEnabled has been deprecated and no longer functions as before. Please use the generic UStereoLayerFunctionLibrary instead.

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

IsLoadingIconEnabled()

UOculusFunctionLibrary::IsLoadingIconEnabled has been deprecated and no longer functions as before. Please use the generic UStereoLayerFunctionLibrary instead.

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

SetLoadingSplashParams

(
    FString TexturePath,
    FVector DistanceInMeters,
    FVector2D SizeInMeters,
    FVector RotationAxis,
    float RotationDeltaInDeg
)

UOculusFunctionLibrary::SetLoadingSplashParams has been deprecated and no longer functions as before. Please use the generic UStereoLayerFunctionLibrary instead.

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

ShowLoadingIcon

(
    UTexture2D* Texture
)

UOculusFunctionLibrary::ShowLoadingIcon has been deprecated and no longer functions as before. Please use the generic UStereoLayerFunctionLibrary instead.

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

ShowLoadingSplashScreen()

UOculusFunctionLibrary::ShowLoadingSplashScreen has been deprecated and no longer functions as before. Use the generic UStereoLayerFunctionLibrary::ShowSplashScreen instead

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss