Class OculusFunctionLibrary
Oculus Function Library
Inherited Members
Namespace: UE4.OculusHMD
Assembly: UE4DotNet.dll
Syntax
public class OculusFunctionLibrary : BlueprintFunctionLibrary
Properties
| Improve this Doc View SourceDefaultObject
Get UE4 Default Object for this Class
Declaration
public static OculusFunctionLibrary DefaultObject { get; }
Property Value
Type | Description |
---|---|
OculusFunctionLibrary |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
Methods
| Improve this Doc View SourceAddLoadingSplashScreen(Texture2D, Vector, Rotator, Vector2D, Rotator, Boolean)
Adds loading splash screen with parameters @
Declaration
public static void AddLoadingSplashScreen(Texture2D Texture, Vector TranslationInMeters, Rotator Rotation, Vector2D SizeInMeters, Rotator DeltaRotation, bool bClearBeforeAdd)
Parameters
Type | Name | Description |
---|---|---|
Texture2D | Texture | |
Vector | TranslationInMeters | |
Rotator | Rotation | |
Vector2D | SizeInMeters | |
Rotator | DeltaRotation | |
System.Boolean | bClearBeforeAdd |
Remarks
param Texture (in) A texture asset to be used for the splash. Gear VR uses it as a path for loading icon; all other params are currently ignored by Gear VR. @param TranslationInMeters (in) Initial translation of the center of the splash screen (in meters). @param Rotation (in) Initial rotation of the splash screen, with the origin at the center of the splash screen. @param SizeInMeters (in) Size, in meters, of the quad with the splash screen. @param DeltaRotation (in) Incremental rotation, that is added each 2nd frame to the quad transform. The quad is rotated around the center of the quad. @param bClearBeforeAdd (in) If true, clears splashes before adding a new one.
ClearLoadingSplashScreens()
Removes all the splash screens.
Declaration
public static void ClearLoadingSplashScreens()
EnableAutoLoadingSplashScreen(Boolean)
Enables/disables splash screen to be automatically shown when LoadMap is called.
Declaration
public static void EnableAutoLoadingSplashScreen(bool bAutoShowEnabled)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bAutoShowEnabled |
Remarks
@param bAutoShowEnabled (in) True, if automatic showing of splash screens is enabled when map is being loaded.
EnableOrientationTracking(Boolean)
Enables/disables orientation tracking on devices that support it.
Declaration
public static void EnableOrientationTracking(bool bOrientationTracking)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bOrientationTracking |
EnablePositionTracking(Boolean)
Enables/disables positional tracking on devices that support it.
Declaration
public static void EnablePositionTracking(bool bPositionTracking)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bPositionTracking |
GetAvailableDisplayFrequencies()
Returns the current available frequencies
Declaration
public static IReadOnlyCollection<float> GetAvailableDisplayFrequencies()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<System.Single> |
GetBaseRotationAndBaseOffsetInMeters()
Returns current base rotation and base offset.
Declaration
public static (Rotator, Vector) GetBaseRotationAndBaseOffsetInMeters()
Returns
Type | Description |
---|---|
System.ValueTuple<Rotator, Vector> |
Remarks
The base offset is currently used base position offset, previously set by the ResetPosition or SetBasePositionOffset calls. It represents a vector that translates the HMD's position into (0,0,0) point, in meters. The axis of the vector are the same as in Unreal: X - forward, Y - right, Z - up.
@param OutRotation (out) Rotator object with base rotation @param OutBaseOffsetInMeters (out) base position offset, vector, in meters.
GetBaseRotationAndPositionOffset()
Returns current base rotation and position offset.
Declaration
public static (Rotator, Vector) GetBaseRotationAndPositionOffset()
Returns
Type | Description |
---|---|
System.ValueTuple<Rotator, Vector> |
Remarks
@param OutRot (out) Rotator object with base rotation @param OutPosOffset (out) the vector with previously set position offset.
GetCurrentDisplayFrequency()
Returns the current display frequency
Declaration
public static float GetCurrentDisplayFrequency()
Returns
Type | Description |
---|---|
System.Single |
GetDeviceName()
Returns the current device's name
Declaration
public static string GetDeviceName()
Returns
Type | Description |
---|---|
System.String |
GetGPUFrameTime()
Returns the GPU frame time on supported mobile platforms (Go for now)
Declaration
public static float GetGPUFrameTime()
Returns
Type | Description |
---|---|
System.Single |
GetGPUUtilization()
Returns the GPU utilization availability and value
Declaration
public static (bool, float) GetGPUUtilization()
Returns
Type | Description |
---|---|
System.ValueTuple<System.Boolean, System.Single> |
GetGuardianDimensions(EBoundaryType)
Returns the dimensions in UE world space of the requested Boundary Type @
Declaration
public static Vector GetGuardianDimensions(EBoundaryType BoundaryType)
Parameters
Type | Name | Description |
---|---|---|
EBoundaryType | BoundaryType |
Returns
Type | Description |
---|---|
Vector |
Remarks
param BoundaryType (in) An enum representing the boundary type requested, either Outer Boundary (exact guardian bounds) or PlayArea (rectangle inside the Outer Boundary)
GetGuardianPoints(EBoundaryType)
Returns the list of points in UE world space of the requested Boundary Type @
Declaration
public static IReadOnlyCollection<Vector> GetGuardianPoints(EBoundaryType BoundaryType)
Parameters
Type | Name | Description |
---|---|---|
EBoundaryType | BoundaryType |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<Vector> |
Remarks
param BoundaryType (in) An enum representing the boundary type requested, either Outer Boundary (exact guardian bounds) or PlayArea (rectangle inside the Outer Boundary)
GetLoadingSplashParams()
Returns loading splash screen parameters.
Declaration
public static (string, Vector, Vector2D, Vector, float) GetLoadingSplashParams()
Returns
Type | Description |
---|---|
System.ValueTuple<System.String, Vector, Vector2D, Vector, System.Single> |
Remarks
@param TexturePath (out) A path to the texture asset to be used for the splash. Gear VR uses it as a path for loading icon; all other params are currently ignored by Gear VR. @param DistanceInMeters (out) Distance, in meters, to the center of the splash screen. @param SizeInMeters (out) Size, in meters, of the quad with the splash screen. @param RotationAxes (out) A vector that specifies the axis of the splash screen rotation (if RotationDelta is specified). @param RotationDeltaInDeg (out) Rotation delta, in degrees, that is added each 2nd frame to the quad transform. The quad is rotated around the vector "RotationAxes".
GetNodeGuardianIntersection(ETrackedDeviceType, EBoundaryType)
Get the intersection result between a tracked device (HMD or controllers) and a guardian boundary @
Declaration
public static GuardianTestResult GetNodeGuardianIntersection(ETrackedDeviceType DeviceType, EBoundaryType BoundaryType)
Parameters
Type | Name | Description |
---|---|---|
ETrackedDeviceType | DeviceType | |
EBoundaryType | BoundaryType |
Returns
Type | Description |
---|---|
GuardianTestResult |
Remarks
param DeviceType (in) Tracked Device type to test against guardian boundaries @param BoundaryType (in) An enum representing the boundary type requested, either Outer Boundary (exact guardian bounds) or PlayArea (rectangle inside the Outer Boundary)
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.
Declaration
public static Transform GetPlayAreaTransform()
Returns
Type | Description |
---|---|
Transform |
GetPointGuardianIntersection(Vector, EBoundaryType)
Get the intersection result between a UE4 coordinate and a guardian boundary @
Declaration
public static GuardianTestResult GetPointGuardianIntersection(Vector Point, EBoundaryType BoundaryType)
Parameters
Type | Name | Description |
---|---|---|
Vector | Point | |
EBoundaryType | BoundaryType |
Returns
Type | Description |
---|---|
GuardianTestResult |
Remarks
param Point (in) Point in UE space to test against guardian boundaries @param BoundaryType (in) An enum representing the boundary type requested, either Outer Boundary (exact guardian bounds) or PlayArea (rectangle inside the Outer Boundary)
GetPose(Boolean, Boolean, Vector)
Grabs the current orientation and position for the HMD.
Declaration
public static (Rotator, Vector, Vector) GetPose(bool bUseOrienationForPlayerCamera, bool bUsePositionForPlayerCamera, Vector PositionScale)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bUseOrienationForPlayerCamera | |
System.Boolean | bUsePositionForPlayerCamera | |
Vector | PositionScale |
Returns
Type | Description |
---|---|
System.ValueTuple<Rotator, Vector, Vector> |
Remarks
If positional tracking is not available, DevicePosition will be a zero vector
@param DeviceRotation (out) The device's current rotation @param DevicePosition (out) The device's current position, in its own tracking space @param NeckPosition (out) The estimated neck position, calculated using NeckToEye vector from User Profile. Same coordinate space as DevicePosition. @param bUseOrienationForPlayerCamera (in) Should be set to 'true' if the orientation is going to be used to update orientation of the camera manually. @param bUsePositionForPlayerCamera (in) Should be set to 'true' if the position is going to be used to update position of the camera manually. @param PositionScale (in) The 3D scale that will be applied to position.
GetRawSensorData(ETrackedDeviceType)
Reports raw sensor data.
Declaration
public static (Vector, Vector, Vector, Vector, float) GetRawSensorData(ETrackedDeviceType DeviceType)
Parameters
Type | Name | Description |
---|---|---|
ETrackedDeviceType | DeviceType |
Returns
Type | Description |
---|---|
System.ValueTuple<Vector, Vector, Vector, Vector, System.Single> |
Remarks
If HMD doesn't support any of the parameters then it will be set to zero.
@param AngularAcceleration (out) Angular acceleration in radians per second per second. @param LinearAcceleration (out) Acceleration in meters per second per second. @param AngularVelocity (out) Angular velocity in radians per second. @param LinearVelocity (out) Velocity in meters per second. @param TimeInSeconds (out) Time when the reported IMU reading took place, in seconds.
GetTiledMultiresLevel()
Returns the current multiresolution level
Declaration
public static ETiledMultiResLevel GetTiledMultiresLevel()
Returns
Type | Description |
---|---|
ETiledMultiResLevel |
GetUserProfile()
Returns current user profile.
Declaration
public static (HmdUserProfile, bool) GetUserProfile()
Returns
Type | Description |
---|---|
System.ValueTuple<HmdUserProfile, System.Boolean> |
Remarks
@param Profile (out) Structure to hold current user profile. @return (boolean) True, if user profile was acquired.
HasInputFocus()
Returns true, if the app has input focus.
Declaration
public static bool HasInputFocus()
Returns
Type | Description |
---|---|
System.Boolean |
HasSystemOverlayPresent()
Returns true, if the system overlay is present.
Declaration
public static bool HasSystemOverlayPresent()
Returns
Type | Description |
---|---|
System.Boolean |
HideLoadingIcon()
Clears the loading icon. This call will clear all the splashes.
Declaration
public static void HideLoadingIcon()
HideLoadingSplashScreen(Boolean)
Hides loading splash screen.
Declaration
public static void HideLoadingSplashScreen(bool bClear)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bClear |
Remarks
@param bClear (in) Clear all splash screens after hide.
IsAutoLoadingSplashScreenEnabled()
Returns true, if the splash screen is automatically shown when LoadMap is called.
Declaration
public static bool IsAutoLoadingSplashScreenEnabled()
Returns
Type | Description |
---|---|
System.Boolean |
IsDeviceTracked(ETrackedDeviceType)
Returns if the device is currently tracked by the runtime or not.
Declaration
public static bool IsDeviceTracked(ETrackedDeviceType DeviceType)
Parameters
Type | Name | Description |
---|---|---|
ETrackedDeviceType | DeviceType |
Returns
Type | Description |
---|---|
System.Boolean |
IsGuardianDisplayed()
Returns true if the Guardian Outer Boundary is being displayed
Declaration
public static bool IsGuardianDisplayed()
Returns
Type | Description |
---|---|
System.Boolean |
IsLoadingIconEnabled()
Returns true, if the splash screen is in loading icon mode.
Declaration
public static bool IsLoadingIconEnabled()
Returns
Type | Description |
---|---|
System.Boolean |
New(UObject, Name)
Spawn an object of this class
Declaration
public static OculusFunctionLibrary New(UObject obj = null, Name name = default(Name))
Parameters
Type | Name | Description |
---|---|---|
UObject | obj | |
Name | name |
Returns
Type | Description |
---|---|
OculusFunctionLibrary |
SetBaseRotationAndBaseOffsetInMeters(Rotator, Vector, Byte)
Sets 'base rotation' - the rotation that will be subtracted from the actual HMD orientation.
Declaration
public static void SetBaseRotationAndBaseOffsetInMeters(Rotator Rotation, Vector BaseOffsetInMeters, byte Options)
Parameters
Type | Name | Description |
---|---|---|
Rotator | Rotation | |
Vector | BaseOffsetInMeters | |
System.Byte | Options |
Remarks
Sets base position offset (in meters). The base position offset is the distance from the physical (0, 0, 0) position to current HMD position (bringing the (0, 0, 0) point to the current HMD position) Note, this vector is set by ResetPosition call; use this method with care. The axis of the vector are the same as in Unreal: X - forward, Y - right, Z - up.
@param Rotation (in) Rotator object with base rotation @param BaseOffsetInMeters (in) the vector to be set as base offset, in meters. @param Options (in) specifies either position, orientation or both should be set.
SetBaseRotationAndPositionOffset(Rotator, Vector, Byte)
Sets 'base rotation' - the rotation that will be subtracted from the actual HMD orientation.
Declaration
public static void SetBaseRotationAndPositionOffset(Rotator BaseRot, Vector PosOffset, byte Options)
Parameters
Type | Name | Description |
---|---|---|
Rotator | BaseRot | |
Vector | PosOffset | |
System.Byte | Options |
Remarks
The position offset might be added to current HMD position, effectively moving the virtual camera by the specified offset. The addition occurs after the HMD orientation and position are applied.
@param BaseRot (in) Rotator object with base rotation @param PosOffset (in) the vector to be added to HMD position. @param Options (in) specifies either position, orientation or both should be set.
SetCPUAndGPULevels(Int32, Int32)
Returns if the device is currently tracked by the runtime or not.
Declaration
public static void SetCPUAndGPULevels(int CPULevel, int GPULevel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | CPULevel | |
System.Int32 | GPULevel |
SetDisplayFrequency(Single)
Sets the requested display frequency
Declaration
public static void SetDisplayFrequency(float RequestedFrequency)
Parameters
Type | Name | Description |
---|---|---|
System.Single | RequestedFrequency |
SetGuardianVisibility(Boolean)
Forces the runtime to render guardian at all times or not @
Declaration
public static void SetGuardianVisibility(bool GuardianVisible)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | GuardianVisible |
Remarks
param GuardianVisible (in) True will display guardian, False will hide it
SetLoadingSplashParams(String, Vector, Vector2D, Vector, Single)
Sets loading splash screen parameters.
Declaration
public static void SetLoadingSplashParams(string TexturePath, Vector DistanceInMeters, Vector2D SizeInMeters, Vector RotationAxis, float RotationDeltaInDeg)
Parameters
Type | Name | Description |
---|---|---|
System.String | TexturePath | |
Vector | DistanceInMeters | |
Vector2D | SizeInMeters | |
Vector | RotationAxis | |
System.Single | RotationDeltaInDeg |
Remarks
@param TexturePath (in) A path to the texture asset to be used for the splash. Gear VR uses it as a path for loading icon; all other params are currently ignored by Gear VR. @param DistanceInMeters (in) Distance, in meters, to the center of the splash screen. @param SizeInMeters (in) Size, in meters, of the quad with the splash screen. @param RotationAxes (in) A vector that specifies the axis of the splash screen rotation (if RotationDelta is specified). @param RotationDeltaInDeg (in) Rotation delta, in degrees, that is added each 2nd frame to the quad transform. The quad is rotated around the vector "RotationAxes".
SetPositionScale3D(Vector)
Scales the HMD position that gets added to the virtual camera position.
Declaration
public static void SetPositionScale3D(Vector PosScale3D)
Parameters
Type | Name | Description |
---|---|---|
Vector | PosScale3D |
Remarks
@param PosScale3D (in) the scale to apply to the HMD position.
SetReorientHMDOnControllerRecenter(Boolean)
Sets the HMD recenter behavior to a mode that specifies HMD recentering behavior when a controller recenter is performed.
Declaration
public static void SetReorientHMDOnControllerRecenter(bool recenterMode)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | recenterMode |
Remarks
If the recenterMode specified is 1, the HMD will recenter on controller recenter; if it's 0, only the controller will recenter. Returns false if not supported.
SetTiledMultiresLevel(ETiledMultiResLevel)
Set the requested multiresolution level for the next frame
Declaration
public static void SetTiledMultiresLevel(ETiledMultiResLevel level)
Parameters
Type | Name | Description |
---|---|---|
ETiledMultiResLevel | level |
ShowLoadingIcon(Texture2D)
Sets a texture for loading icon mode and shows it. This call will clear all the splashes.
Declaration
public static void ShowLoadingIcon(Texture2D Texture)
Parameters
Type | Name | Description |
---|---|---|
Texture2D | Texture |
ShowLoadingSplashScreen()
Shows loading splash screen.
Declaration
public static void ShowLoadingSplashScreen()
Operators
| Improve this Doc View SourceImplicit(IntPtr to OculusFunctionLibrary)
Convert from IntPtr to UObject
Declaration
public static implicit operator OculusFunctionLibrary(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | p |
Returns
Type | Description |
---|---|
OculusFunctionLibrary |