remove some left-over code

This commit is contained in:
Seth Alves 2016-08-31 16:39:57 -07:00
parent 280b603747
commit dc31525794
2 changed files with 4 additions and 9 deletions

View file

@ -532,8 +532,7 @@ void MyAvatar::updateFromHMDSensorMatrix(const glm::mat4& hmdSensorMatrix) {
_hmdSensorFacing = getFacingDir2D(_hmdSensorOrientation); _hmdSensorFacing = getFacingDir2D(_hmdSensorOrientation);
} }
void MyAvatar::updateJointFromController(glm::mat4& previousSensorToWorldInverseMatrix, controller::Action poseKey, void MyAvatar::updateJointFromController(controller::Action poseKey, ThreadSafeValueCache<glm::mat4>& matrixCache) {
ThreadSafeValueCache<glm::mat4>& matrixCache) {
assert(QThread::currentThread() == thread()); assert(QThread::currentThread() == thread());
auto userInputMapper = DependencyManager::get<UserInputMapper>(); auto userInputMapper = DependencyManager::get<UserInputMapper>();
controller::Pose controllerPose = userInputMapper->getPoseState(poseKey); controller::Pose controllerPose = userInputMapper->getPoseState(poseKey);
@ -548,9 +547,6 @@ void MyAvatar::updateJointFromController(glm::mat4& previousSensorToWorldInverse
// update sensor to world matrix from current body position and hmd sensor. // update sensor to world matrix from current body position and hmd sensor.
// This is so the correct camera can be used for rendering. // This is so the correct camera can be used for rendering.
void MyAvatar::updateSensorToWorldMatrix() { void MyAvatar::updateSensorToWorldMatrix() {
glm::mat4 previousSensorToWorldInverse = glm::inverse(_sensorToWorldMatrix);
// update the sensor mat so that the body position will end up in the desired // update the sensor mat so that the body position will end up in the desired
// position when driven from the head. // position when driven from the head.
glm::mat4 desiredMat = createMatFromQuatAndPos(getOrientation(), getPosition()); glm::mat4 desiredMat = createMatFromQuatAndPos(getOrientation(), getPosition());
@ -565,8 +561,8 @@ void MyAvatar::updateSensorToWorldMatrix() {
_sensorToWorldMatrixCache.set(_sensorToWorldMatrix); _sensorToWorldMatrixCache.set(_sensorToWorldMatrix);
updateJointFromController(previousSensorToWorldInverse, controller::Action::LEFT_HAND, _controllerLeftHandMatrixCache); updateJointFromController(controller::Action::LEFT_HAND, _controllerLeftHandMatrixCache);
updateJointFromController(previousSensorToWorldInverse, controller::Action::RIGHT_HAND, _controllerRightHandMatrixCache); updateJointFromController(controller::Action::RIGHT_HAND, _controllerRightHandMatrixCache);
} }
// Update avatar head rotation with sensor data // Update avatar head rotation with sensor data

View file

@ -119,8 +119,7 @@ public:
void updateFromHMDSensorMatrix(const glm::mat4& hmdSensorMatrix); void updateFromHMDSensorMatrix(const glm::mat4& hmdSensorMatrix);
// read the location of a hand controller and save the transform // read the location of a hand controller and save the transform
void updateJointFromController(glm::mat4& previousSensorToWorldInverseMatrix, controller::Action poseKey, void updateJointFromController(controller::Action poseKey, ThreadSafeValueCache<glm::mat4>& matrixCache);
ThreadSafeValueCache<glm::mat4>& matrixCache);
// best called at end of main loop, just before rendering. // best called at end of main loop, just before rendering.
// update sensor to world matrix from current body position and hmd sensor. // update sensor to world matrix from current body position and hmd sensor.