OpenVRProvider

Engine/source/platform/input/openVR/openVRProvider.h

More...

Classes:

OpenVR state

}

{

vr::IVRSystem *
vr::IVRRenderModels *
vr::TrackedDevicePose_t
mTrackedDevicePose [vr::k_unMaxTrackedDeviceCount]
mCurrentDevicePose [vr::k_unMaxTrackedDeviceCount]
mPreviousInputTrackedDevicePose [vr::k_unMaxTrackedDeviceCount]
vr::VRControllerState_t
mCurrentControllerState [vr::k_unMaxTrackedDeviceCount]
vr::VRControllerState_t
mPreviousCurrentControllerState [vr::k_unMaxTrackedDeviceCount]
char
mDeviceClassChar [vr::k_unMaxTrackedDeviceCount]
vr::ETrackingUniverseOrigin
OVR_SENSORROT [vr::k_unMaxTrackedDeviceCount]
OVR_SENSORROTANG [vr::k_unMaxTrackedDeviceCount]
OVR_SENSORVELOCITY [vr::k_unMaxTrackedDeviceCount]
OVR_SENSORANGVEL [vr::k_unMaxTrackedDeviceCount]
OVR_SENSORMAGNETOMETER [vr::k_unMaxTrackedDeviceCount]
OVR_SENSORPOSITION [vr::k_unMaxTrackedDeviceCount]
OVR_BUTTONPRESSED [vr::k_unMaxTrackedDeviceCount]
OVR_BUTTONTOUCHED [vr::k_unMaxTrackedDeviceCount]
OVR_AXISNONE [vr::k_unMaxTrackedDeviceCount]
OVR_AXISTRACKPAD [vr::k_unMaxTrackedDeviceCount]
OVR_AXISJOYSTICK [vr::k_unMaxTrackedDeviceCount]
OVR_AXISTRIGGER [vr::k_unMaxTrackedDeviceCount]

Input handling

{

Display handling

}

{

Get a display pose for the specified eye, or the HMD if eyeId is -1.

Returns eye offset not taking into account any position tracking info.

Returns a texture handle representing a preview of the composited VR view.

setRoomTracking(bool room)

Overlay registration

}

{

Model loading

}

{

Console API

}

{

Public Types

enum
DataDifferences {
  DIFF_NONE = 0
  DIFF_ROT = (1 << 0)
  DIFF_ROTAXISX = (1 << 1)
  DIFF_ROTAXISY = (1 << 2)
  DIFF_ACCEL = (1 << 3)
  DIFF_ANGVEL = (1 << 4)
  DIFF_MAG = (1 << 5)
  DIFF_POS = (1 << 6)
  DIFF_STATUS = (1 << 7)
  DIFF_ROTAXIS = (DIFF_ROTAXISX | DIFF_ROTAXISY)
  DIFF_RAW = (DIFF_ACCEL | DIFF_ANGVEL | DIFF_MAG)
}
Signal< void(const vr::VREvent_t &evt)>
VREventSignal 

Public Functions

Public Static Functions

Detailed Description

OpenVR state

}

{

vr::IVRSystem * mHMD 
vr::IVRRenderModels * mRenderModels 
String mDriver 
String mDisplay 
vr::TrackedDevicePose_t mTrackedDevicePose [vr::k_unMaxTrackedDeviceCount]
IDevicePose mCurrentDevicePose [vr::k_unMaxTrackedDeviceCount]
IDevicePose mPreviousInputTrackedDevicePose [vr::k_unMaxTrackedDeviceCount]
U32 mValidPoseCount 
vr::VRControllerState_t mCurrentControllerState [vr::k_unMaxTrackedDeviceCount]
vr::VRControllerState_t mPreviousCurrentControllerState [vr::k_unMaxTrackedDeviceCount]
char mDeviceClassChar [vr::k_unMaxTrackedDeviceCount]
OpenVRRenderState mHMDRenderState 
GFXAdapterLUID mLUID 
vr::ETrackingUniverseOrigin mTrackingSpace 
Vector< OpenVROverlay * > mOverlays 
VREventSignal mVREventSignal 
Namespace * mOpenVRNS 
Vector< LoadedRenderModel > mLoadedModels 
Vector< LoadedRenderTexture > mLoadedTextures 
Map< StringTableEntry, S32 > mLoadedModelLookup 
Map< U32, S32 > mLoadedTextureLookup 
Map< U32, S32 > mDeviceEventMap 
GuiCanvas * mDrawCanvas 

}

GameConnection * mGameConnection 
U32 OVR_SENSORROT [vr::k_unMaxTrackedDeviceCount]
U32 OVR_SENSORROTANG [vr::k_unMaxTrackedDeviceCount]
U32 OVR_SENSORVELOCITY [vr::k_unMaxTrackedDeviceCount]
U32 OVR_SENSORANGVEL [vr::k_unMaxTrackedDeviceCount]
U32 OVR_SENSORMAGNETOMETER [vr::k_unMaxTrackedDeviceCount]
U32 OVR_SENSORPOSITION [vr::k_unMaxTrackedDeviceCount]
U32 OVR_BUTTONPRESSED [vr::k_unMaxTrackedDeviceCount]
U32 OVR_BUTTONTOUCHED [vr::k_unMaxTrackedDeviceCount]
U32 OVR_AXISNONE [vr::k_unMaxTrackedDeviceCount]
U32 OVR_AXISTRACKPAD [vr::k_unMaxTrackedDeviceCount]
U32 OVR_AXISJOYSTICK [vr::k_unMaxTrackedDeviceCount]
U32 OVR_AXISTRIGGER [vr::k_unMaxTrackedDeviceCount]

HMD Rotation offset

{

getSingletonName()

}

EulerF smHMDRotOffset 
F32 smHMDmvYaw 
F32 smHMDmvPitch 
bool smRotateYawWithMoveActions 

Input handling

{

buildInputCodeTable()

process()

Reimplemented from: IInputDevice

Display handling

}

{

providesFrameEyePose()

Reimplemented from: IDisplayDevice

getFrameEyePose(IDevicePose * pose, S32 eyeId)

Reimplemented from: IDisplayDevice

providesEyeOffsets()

Reimplemented from: IDisplayDevice

getEyeOffsets(Point3F * dest)

Reimplemented from: IDisplayDevice

providesFovPorts()

Reimplemented from: IDisplayDevice

getFovPorts(FovPort * out)

Reimplemented from: IDisplayDevice

getStereoViewports(RectI * out)

Reimplemented from: IDisplayDevice

getStereoTargets(GFXTextureTarget ** out)

Reimplemented from: IDisplayDevice

setDrawCanvas(GuiCanvas * canvas)

Reimplemented from: IDisplayDevice

setDrawMode(GFXDevice::GFXDeviceRenderStyles style)

Reimplemented from: IDisplayDevice

setCurrentConnection(GameConnection * connection)

Reimplemented from: IDisplayDevice

getCurrentConnection()

Reimplemented from: IDisplayDevice

getPreviewTexture()

Reimplemented from: IDisplayDevice

onStartFrame()

Reimplemented from: IDisplayDevice

onEndFrame()

onEyeRendered(U32 index)

setRoomTracking(bool room)

_handleDeviceEvent(GFXDevice::GFXDeviceEventType evt)

getDisplayDeviceId()

OpenVR handling

}

{

processVREvent(const vr::VREvent_t & event)

updateTrackedPoses()

submitInputChanges()

resetSensors()

mapDeviceToEvent(U32 deviceIdx, S32 eventIdx)

resetEventMap()

getTrackedDevicePose(U32 idx)

Overlay registration

}

{

registerOverlay(OpenVROverlay * overlay)

unregisterOverlay(OpenVROverlay * overlay)

Model loading

}

{

preloadRenderModel(StringTableEntry name)

preloadRenderModelTexture(U32 index)

getRenderModel(S32 idx, OpenVRRenderModel ** ret, bool & failed)

getRenderModelTexture(S32 idx, GFXTextureObject ** outTex, bool & failed)

getRenderModelTextureName(S32 idx, String & outName)

resetRenderModels()

Console API

}

{

getGamepadFocusOverlay()

setOverlayNeighbour(vr::EOverlayDirection dir, OpenVROverlay * overlay)

isDashboardVisible()

showDashboard(const char * overlayToShow)

getPrimaryDashboardDevice()

setKeyboardTransformAbsolute(const MatrixF & xfm)

setKeyboardPositionForOverlay(OpenVROverlay * overlay, const RectI & rect)

getControllerDeviceIndexes(vr::TrackedDeviceClass & deviceClass, Vector< S32 > & outList)

getControllerModel(U32 idx)

Public Types

DataDifferences

Enumerator

DIFF_NONE = 0
DIFF_ROT = (1 << 0)
DIFF_ROTAXISX = (1 << 1)
DIFF_ROTAXISY = (1 << 2)
DIFF_ACCEL = (1 << 3)
DIFF_ANGVEL = (1 << 4)
DIFF_MAG = (1 << 5)
DIFF_POS = (1 << 6)
DIFF_STATUS = (1 << 7)
DIFF_ROTAXIS = (DIFF_ROTAXISX | DIFF_ROTAXISY)
DIFF_RAW = (DIFF_ACCEL | DIFF_ANGVEL | DIFF_MAG)
typedef Signal< void(const vr::VREvent_t &evt)> VREventSignal 

Public Functions

OpenVRProvider()

~OpenVRProvider()

disable()

enable()

getActive()

getRenderModels()

getVREventSignal()

Public Static Functions

staticInit()