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
186 batch.drawIndexed(gpu::TRIANGLES, mesh->getNumIndices(), 0);186 batch.drawIndexed(gpu::TRIANGLES, mesh->getNumIndices(), 0);
187}187}
188 188
189void ViveControllerManager::update(float deltaTime) {189void ViveControllerManager::update(float deltaTime, bool jointsCaptured) {
190 _poseStateMap.clear();
190 // TODO: This shouldn't be necessary191 // TODO: This shouldn't be necessary
191 if (!_hmd) {192 if (!_hmd) {
192 return;193 return;
@@ -216,8 +217,10 @@ void ViveControllerManager::update(float deltaTime) { · 23 unmodified lines
216 numTrackedControllers++;217 numTrackedControllers++;
217 218
218 const mat4& mat = _trackedDevicePoseMat4[device];219 const mat4& mat = _trackedDevicePoseMat4[device];
219 220
220 handlePoseEvent(mat, numTrackedControllers - 1);221 if (!jointsCaptured) {
222 handlePoseEvent(mat, numTrackedControllers - 1);
223 }
221 224
222 // handle inputs225 // handle inputs
223 vr::VRControllerState_t controllerState = vr::VRControllerState_t();226 vr::VRControllerState_t controllerState = vr::VRControllerState_t();