Skip to content

Commit

Permalink
Added in raw and no dead zone version of index trigger, grip trigger …
Browse files Browse the repository at this point in the history
…and thumbsticks.
  • Loading branch information
rajetic committed Mar 27, 2020
1 parent 35fe68b commit 10187f5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
Binary file modified oculusmonitor/oculusmonitor.cpp
Binary file not shown.
19 changes: 12 additions & 7 deletions oculusmonitor/vrstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,18 @@ VRState StateManager::poll(ovrSession hmd, double time)
ovr_GetInputState(hmd, ovrControllerType::ovrControllerType_Touch, &temp);
state.touchButtons = temp.Buttons;
state.touchTouch = temp.Touches;
state.touchHandTrigger[0] = temp.HandTrigger[0];
state.touchHandTrigger[1] = temp.HandTrigger[1];
state.touchIndexTrigger[0] = temp.IndexTrigger[0];
state.touchIndexTrigger[1] = temp.IndexTrigger[1];
state.touchThumbStick[0] = temp.Thumbstick[0];
state.touchThumbStick[1] = temp.Thumbstick[1];

for (int i = 0; i < 2; ++i)
{
state.touchHandTrigger[i] = temp.HandTrigger[i];
state.touchHandTriggerNDZ[i] = temp.HandTriggerNoDeadzone[i];
state.touchHandTriggerRaw[i] = temp.HandTriggerRaw[i];
state.touchIndexTrigger[i] = temp.IndexTrigger[i];
state.touchIndexTriggerNDZ[i] = temp.IndexTriggerNoDeadzone[i];
state.touchIndexTriggerRaw[i] = temp.IndexTriggerRaw[i];
state.touchThumbStick[i] = temp.Thumbstick[i];
state.touchThumbStickNDZ[i] = temp.ThumbstickNoDeadzone[i];
state.touchThumbStickRaw[i] = temp.ThumbstickRaw[i];
}
state.sensorCount = ovr_GetTrackerCount(hmd);
for (unsigned int i = 0; i < state.sensorCount; ++i)
{
Expand Down
6 changes: 6 additions & 0 deletions oculusmonitor/vrstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ struct VRState
unsigned int touchButtons;
unsigned int touchTouch;
ovrVector2f touchThumbStick[2];
ovrVector2f touchThumbStickNDZ[2];
ovrVector2f touchThumbStickRaw[2];
float touchHandTrigger[2];
float touchHandTriggerNDZ[2];
float touchHandTriggerRaw[2];
float touchIndexTrigger[2];
float touchIndexTriggerNDZ[2];
float touchIndexTriggerRaw[2];
ovrTrackingState trackingState;
unsigned int sensorCount;
ovrTrackerPose sensorPose[4];
Expand Down

0 comments on commit 10187f5

Please sign in to comment.