From c61966ebcd89bdd19df4f5612200587ed4546d64 Mon Sep 17 00:00:00 2001 From: Eric Johnston Date: Mon, 15 Jul 2013 14:12:52 -0700 Subject: [PATCH] made Leap unit-conversion method public --- interface/src/Hand.h | 4 +++- libraries/avatars/src/HandData.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/interface/src/Hand.h b/interface/src/Hand.h index 244ff0dafd..1c25c85fbc 100755 --- a/interface/src/Hand.h +++ b/interface/src/Hand.h @@ -50,6 +50,9 @@ public: // getters const glm::vec3& getLeapBallPosition (int ball) const { return _leapBalls[ball].position;} + // position conversion + glm::vec3 leapPositionToWorldPosition(const glm::vec3& leapPosition); + private: // disallow copies of the Hand, copy of owning Avatar is disallowed too Hand(const Hand&); @@ -66,7 +69,6 @@ private: // private methods void renderHandSpheres(); void calculateGeometry(); - glm::vec3 leapPositionToWorldPosition(const glm::vec3& leapPosition); }; #endif diff --git a/libraries/avatars/src/HandData.h b/libraries/avatars/src/HandData.h index b0d71b4dee..3de7364071 100755 --- a/libraries/avatars/src/HandData.h +++ b/libraries/avatars/src/HandData.h @@ -20,6 +20,8 @@ class HandData { public: HandData(AvatarData* owningAvatar); + // These methods return the positions in Leap-relative space. + // To vonvert to world coordinates, use Hand::leapPositionToWorldPosition. const std::vector& getFingerTips() const { return _fingerTips; } const std::vector& getFingerRoots() const { return _fingerRoots; } const std::vector& getHandPositions() const { return _handPositions; }