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.

Public Statics

static OCULUSXRHMD_API const FName NAME_OculusXRHMD[Get]

Static Member Functions

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.
Returns
Returns singleton instance, loading the module on demand if needed
Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.
Returns
True if the module is loaded and ready to use

Member Functions

Grabs the current orientation and position for the HMD. If positional tracking is not available, DevicePosition will be a zero vector
Parameters
DeviceRotation
(out) The device's current rotation
DevicePosition
(out) The device's current position, in its own tracking space
NeckPosition
(out) The estimated neck position, calculated using NeckToEye vector from User Profile. Same coordinate space as DevicePosition.
bUseOrienationForPlayerCamera
(in) Should be set to 'true' if the orientation is going to be used to update orientation of the camera manually.
bUsePositionForPlayerCamera
(in) Should be set to 'true' if the position is going to be used to update position of the camera manually.
PositionScale
(in) The 3D scale that will be applied to position.
Reports raw sensor data. If HMD doesn't support any of the parameters then it will be set to zero.
Parameters
AngularAcceleration
(out) Angular acceleration in radians per second per second.
LinearAcceleration
(out) Acceleration in meters per second per second.
AngularVelocity
(out) Angular velocity in radians per second.
LinearVelocity
(out) Velocity in meters per second.
TimeInSeconds
(out) Time when the reported IMU reading took place, in seconds.
Returns current user profile.
Parameters
Profile
(out) Structure to hold current user profile.
Returns
(boolean) True, if user profile was acquired.
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.
Parameters
Rotation
(in) Rotator object with base rotation
BaseOffsetInMeters
(in) the vector to be set as base offset, in meters.
Options
(in) specifies either position, orientation or both should be set.
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.
Parameters
OutRotation
(out) Rotator object with base rotation
OutBaseOffsetInMeters
(out) base position offset, vector, in meters.
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.
Parameters
BaseRot
(in) Rotator object with base rotation
PosOffset
(in) the vector to be added to HMD position.
Options
(in) specifies either position, orientation or both should be set.
Returns current base rotation and position offset.
Parameters
OutRot
(out) Rotator object with base rotation
OutPosOffset
(out) the vector with previously set position offset.
Returns IStereoLayers interface to work with overlays.
FString GetDeviceSystemName ( )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon