API reference
API reference
Select your platform
No SDKs available
No versions available

IOculusXRHMDModule Class

Extends IHeadMountedDisplayModule
The public interface to this module. In most cases, this interface is only public to sibling modules within this plugin.

Static Fields

NAME_OculusXRHMD : OCULUSXRHMD_API const FName
Signature
OCULUSXRHMD_API const FName IOculusXRHMDModule::NAME_OculusXRHMD

Member Functions

GetBaseRotationAndBaseOffsetInMeters ( OutRotation , OutBaseOffsetInMeters )
Returns current base rotation and base offset. 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.
Signature
virtual void IOculusXRHMDModule::GetBaseRotationAndBaseOffsetInMeters(FRotator &OutRotation, FVector &OutBaseOffsetInMeters)=0
Parameters
OutRotation: FRotator &  (out) Rotator object with base rotation
OutBaseOffsetInMeters: FVector &  (out) base position offset, vector, in meters.
Returns
void
GetBaseRotationAndPositionOffset ( OutRot , OutPosOffset )
Returns current base rotation and position offset.
Signature
virtual void IOculusXRHMDModule::GetBaseRotationAndPositionOffset(FRotator &OutRot, FVector &OutPosOffset)=0
Parameters
OutRot: FRotator &  (out) Rotator object with base rotation
OutPosOffset: FVector &  (out) the vector with previously set position offset.
Returns
void
GetDeviceSystemName ()
Signature
virtual FString IOculusXRHMDModule::GetDeviceSystemName()=0
Returns
FString
GetPose ( DeviceRotation , DevicePosition , NeckPosition , bUseOrienationForPlayerCamera , bUsePositionForPlayerCamera , PositionScale )
Grabs the current orientation and position for the HMD. If positional tracking is not available, DevicePosition will be a zero vector
Signature
virtual void IOculusXRHMDModule::GetPose(FRotator &DeviceRotation, FVector &DevicePosition, FVector &NeckPosition, bool bUseOrienationForPlayerCamera=false, bool bUsePositionForPlayerCamera=false, const FVector PositionScale=FVector::ZeroVector)=0
Parameters
DeviceRotation: FRotator &  (out) The device's current rotation
DevicePosition: FVector &  (out) The device's current position, in its own tracking space
NeckPosition: FVector &  (out) The estimated neck position, calculated using NeckToEye vector from User Profile. Same coordinate space as DevicePosition.
bUseOrienationForPlayerCamera: bool  (in) Should be set to 'true' if the orientation is going to be used to update orientation of the camera manually.
bUsePositionForPlayerCamera: bool  (in) Should be set to 'true' if the position is going to be used to update position of the camera manually.
PositionScale: const FVector  (in) The 3D scale that will be applied to position.
Returns
void
GetRawSensorData ( AngularAcceleration , LinearAcceleration , AngularVelocity , LinearVelocity , TimeInSeconds )
Reports raw sensor data. If HMD doesn't support any of the parameters then it will be set to zero.
Signature
virtual void IOculusXRHMDModule::GetRawSensorData(FVector &AngularAcceleration, FVector &LinearAcceleration, FVector &AngularVelocity, FVector &LinearVelocity, float &TimeInSeconds)=0
Parameters
AngularAcceleration: FVector &  (out) Angular acceleration in radians per second per second.
LinearAcceleration: FVector &  (out) Acceleration in meters per second per second.
AngularVelocity: FVector &  (out) Angular velocity in radians per second.
LinearVelocity: FVector &  (out) Velocity in meters per second.
TimeInSeconds: float &  (out) Time when the reported IMU reading took place, in seconds.
Returns
void
GetStereoLayers ()
Returns IStereoLayers interface to work with overlays.
Signature
virtual class IStereoLayers * IOculusXRHMDModule::GetStereoLayers()=0
Returns
class IStereoLayers *
GetUserProfile ( Profile )
Returns current user profile.
Signature
virtual bool IOculusXRHMDModule::GetUserProfile(struct FOculusXRHmdUserProfile &Profile)=0
Parameters
Profile: struct FOculusXRHmdUserProfile &  (out) Structure to hold current user profile.
Returns
bool  (boolean) True, if user profile was acquired.
SetBaseRotationAndBaseOffsetInMeters ( Rotation , BaseOffsetInMeters , Options )
Sets 'base rotation' - the rotation that will be subtracted from the actual HMD orientation. 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.
Signature
virtual void IOculusXRHMDModule::SetBaseRotationAndBaseOffsetInMeters(FRotator Rotation, FVector BaseOffsetInMeters, EOrientPositionSelector::Type Options)=0
Parameters
Rotation: FRotator  (in) Rotator object with base rotation
BaseOffsetInMeters: FVector  (in) the vector to be set as base offset, in meters.
Options: EOrientPositionSelector::Type  (in) specifies either position, orientation or both should be set.
Returns
void
SetBaseRotationAndPositionOffset ( BaseRot , PosOffset , Options )
Sets 'base rotation' - the rotation that will be subtracted from the actual HMD orientation. 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.
Signature
virtual void IOculusXRHMDModule::SetBaseRotationAndPositionOffset(FRotator BaseRot, FVector PosOffset, EOrientPositionSelector::Type Options)=0
Parameters
BaseRot: FRotator  (in) Rotator object with base rotation
PosOffset: FVector  (in) the vector to be added to HMD position.
Options: EOrientPositionSelector::Type  (in) specifies either position, orientation or both should be set.
Returns
void

Static Member Functions

Get ()
Singleton-like access to this module's interface. This is just for convenience! Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.
Signature
static IOculusXRHMDModule & IOculusXRHMDModule::Get()
Returns
IOculusXRHMDModule &  Returns singleton instance, loading the module on demand if needed
IsAvailable ()
Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.
Signature
static bool IOculusXRHMDModule::IsAvailable()
Returns
bool  True if the module is loaded and ready to use