From 4b94e53acf8c5058d9d6aa3e609907cf6783ca23 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Wed, 15 Jan 2014 17:02:02 -0800 Subject: [PATCH] Removing Model::findSpherePenetrationWithJoint() which was experimental method that was not finally used. --- interface/src/renderer/Model.cpp | 23 ----------------------- interface/src/renderer/Model.h | 11 ++++------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/interface/src/renderer/Model.cpp b/interface/src/renderer/Model.cpp index 8779672c25..3509357b0c 100644 --- a/interface/src/renderer/Model.cpp +++ b/interface/src/renderer/Model.cpp @@ -634,29 +634,6 @@ bool Model::findSpherePenetration(const glm::vec3& penetratorCenter, float penet return false; } -// TODO: purge this once we get proper collisions against hand paddles -bool Model::findSpherePenetrationWithJoint(const glm::vec3& sphereCenter, float sphereRadius, - glm::vec3& penetration, int jointIndex, float boneScale) const { - if (jointIndex < 0 || jointIndex > _jointStates.size()) { - return false; - } - const FBXGeometry& geometry = _geometry->getFBXGeometry(); - const FBXJoint& joint = geometry.joints[jointIndex]; - glm::vec3 end = extractTranslation(_jointStates[jointIndex].transform); - float radiusScale = extractUniformScale(_scale) * boneScale; - float endRadius = joint.boneRadius * radiusScale; - glm::vec3 start = end; - float startRadius = joint.boneRadius * radiusScale; - glm::vec3 bonePenetration; - if (joint.parentIndex != -1) { - start = extractTranslation(_jointStates[joint.parentIndex].transform); - startRadius = geometry.joints[joint.parentIndex].boneRadius * radiusScale; - } - const glm::vec3 relativeCenter = sphereCenter - _translation; - return findSphereCapsuleConePenetration(relativeCenter, sphereRadius, start, end, - startRadius, endRadius, penetration); -} - void Model::updateJointState(int index) { JointState& state = _jointStates[index]; const FBXGeometry& geometry = _geometry->getFBXGeometry(); diff --git a/interface/src/renderer/Model.h b/interface/src/renderer/Model.h index c0d3ea0fbc..ae4303caea 100644 --- a/interface/src/renderer/Model.h +++ b/interface/src/renderer/Model.h @@ -84,19 +84,19 @@ public: /// Retrieve the position of the left hand /// \return true whether or not the position was found - bool getLeftHandPosition(glm::vec3&) const; + bool getLeftHandPosition(glm::vec3& position) const; /// Retrieve the rotation of the left hand /// \return true whether or not the rotation was found - bool getLeftHandRotation(glm::quat&) const; + bool getLeftHandRotation(glm::quat& rotation) const; /// Retrieve the position of the right hand /// \return true whether or not the position was found - bool getRightHandPosition(glm::vec3&) const; + bool getRightHandPosition(glm::vec3& position) const; /// Retrieve the rotation of the right hand /// \return true whether or not the rotation was found - bool getRightHandRotation(glm::quat&) const; + bool getRightHandRotation(glm::quat& rotation) const; /// Sets the position of the left hand using inverse kinematics. /// \return whether or not the left hand joint was found @@ -146,9 +146,6 @@ public: bool findSpherePenetration(const glm::vec3& penetratorCenter, float penetratorRadius, glm::vec3& penetration, float boneScale = 1.0f, int skipIndex = -1) const; - bool findSpherePenetrationWithJoint(const glm::vec3& sphereCenter, float sphereRadius, - glm::vec3& penetration, int jointIndex, float boneScale = 1.0f) const; - protected: QSharedPointer _geometry;