History

cleaning up plugin architecture, fixed hand controllers

Anthony J. Thibault committed 11 years ago

Commit 01c740f1 parent 5fe4d0620 files · +184 −257Browse files

Showing the changes to libraries/input-plugins/src/input-plugins/ViveControllerManager.cpp (1 of 20 files). Show all

Unified · Split

libraries/input-plugins/src/input-plugins/ViveControllerManager.cpp+6−3
@@ -186,7 +186,8 @@ void ViveControllerManager::renderHand(UserInputMapper::PoseValue pose, gpu::Bat · 185 unmodified lines
186186 batch.drawIndexed(gpu::TRIANGLES, mesh->getNumIndices(), 0);
187187 }
188188
189−void ViveControllerManager::update(float deltaTime) {
189+void ViveControllerManager::update(float deltaTime, bool jointsCaptured) {
190+ _poseStateMap.clear();
190191 // TODO: This shouldn't be necessary
191192 if (!_hmd) {
192193 return;
@@ -216,8 +217,10 @@ void ViveControllerManager::update(float deltaTime) { · 23 unmodified lines
216217 numTrackedControllers++;
217218
218219 const mat4& mat = _trackedDevicePoseMat4[device];
219−
220− handlePoseEvent(mat, numTrackedControllers - 1);
220+
221+ if (!jointsCaptured) {
222+ handlePoseEvent(mat, numTrackedControllers - 1);
223+ }
221224
222225 // handle inputs
223226 vr::VRControllerState_t controllerState = vr::VRControllerState_t();