diff --git a/interface/src/avatar/Hand.cpp b/interface/src/avatar/Hand.cpp index 7b2968973c..aee032aa93 100644 --- a/interface/src/avatar/Hand.cpp +++ b/interface/src/avatar/Hand.cpp @@ -14,7 +14,6 @@ #include #include -#include #include "AvatarManager.h" #include "Hand.h" @@ -43,58 +42,6 @@ void Hand::simulate(float deltaTime, bool isMine) { } } -// We create a static CollisionList that is recycled for each collision test. -const float MAX_COLLISIONS_PER_AVATAR = 32; -static CollisionList handCollisions(MAX_COLLISIONS_PER_AVATAR); - -void Hand::collideAgainstAvatar(Avatar* avatar, bool isMyHand) { - if (!avatar || avatar == _owningAvatar) { - // don't collide hands against ourself (that is done elsewhere) - return; - } - - const SkeletonModel& skeletonModel = _owningAvatar->getSkeletonModel(); - int jointIndices[2]; - jointIndices[0] = skeletonModel.getLeftHandJointIndex(); - jointIndices[1] = skeletonModel.getRightHandJointIndex(); - - for (size_t i = 0; i < 2; i++) { - int jointIndex = jointIndices[i]; - if (jointIndex < 0) { - continue; - } - - handCollisions.clear(); - QVector shapes; - skeletonModel.getHandShapes(jointIndex, shapes); - - if (avatar->findCollisions(shapes, handCollisions)) { - glm::vec3 totalPenetration(0.0f); - glm::vec3 averageContactPoint; - for (int j = 0; j < handCollisions.size(); ++j) { - CollisionInfo* collision = handCollisions.getCollision(j); - totalPenetration += collision->_penetration; - averageContactPoint += collision->_contactPoint; - } - if (isMyHand) { - // our hand against other avatar - // TODO: resolve this penetration when we don't think the other avatar will yield - //palm.addToPenetration(averagePenetration); - } else { - // someone else's hand against MyAvatar - // TODO: submit collision info to MyAvatar which should lean accordingly - averageContactPoint /= (float)handCollisions.size(); - avatar->applyCollision(averageContactPoint, totalPenetration); - - CollisionInfo collision; - collision._penetration = totalPenetration; - collision._contactPoint = averageContactPoint; - emit avatar->collisionWithAvatar(avatar->getSessionUUID(), _owningAvatar->getSessionUUID(), collision); - } - } - } -} - void Hand::resolvePenetrations() { for (size_t i = 0; i < getNumPalms(); ++i) { PalmData& palm = getPalms()[i]; diff --git a/interface/src/avatar/Hand.h b/interface/src/avatar/Hand.h index f6991c5a55..5e070d53e0 100644 --- a/interface/src/avatar/Hand.h +++ b/interface/src/avatar/Hand.h @@ -30,11 +30,6 @@ class Avatar; -class ProgramObject; - -const float HAND_PADDLE_OFFSET = 0.1f; -const float HAND_PADDLE_THICKNESS = 0.01f; -const float HAND_PADDLE_RADIUS = 0.15f; class Hand : public HandData { public: @@ -43,8 +38,6 @@ public: void simulate(float deltaTime, bool isMine); void render(RenderArgs* renderArgs, bool isMine); - void collideAgainstAvatar(Avatar* avatar, bool isMyHand); - void resolvePenetrations(); private: diff --git a/interface/src/avatar/Head.h b/interface/src/avatar/Head.h index 3f839d53bc..2baa16f90c 100644 --- a/interface/src/avatar/Head.h +++ b/interface/src/avatar/Head.h @@ -26,7 +26,6 @@ const float EYE_EAR_GAP = 0.08f; class Avatar; -class ProgramObject; class Head : public HeadData { public: