mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:36:54 +02:00
made Leap unit-conversion method public
This commit is contained in:
parent
86faa33f83
commit
c61966ebcd
2 changed files with 5 additions and 1 deletions
|
@ -50,6 +50,9 @@ public:
|
||||||
// getters
|
// getters
|
||||||
const glm::vec3& getLeapBallPosition (int ball) const { return _leapBalls[ball].position;}
|
const glm::vec3& getLeapBallPosition (int ball) const { return _leapBalls[ball].position;}
|
||||||
|
|
||||||
|
// position conversion
|
||||||
|
glm::vec3 leapPositionToWorldPosition(const glm::vec3& leapPosition);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// disallow copies of the Hand, copy of owning Avatar is disallowed too
|
// disallow copies of the Hand, copy of owning Avatar is disallowed too
|
||||||
Hand(const Hand&);
|
Hand(const Hand&);
|
||||||
|
@ -66,7 +69,6 @@ private:
|
||||||
// private methods
|
// private methods
|
||||||
void renderHandSpheres();
|
void renderHandSpheres();
|
||||||
void calculateGeometry();
|
void calculateGeometry();
|
||||||
glm::vec3 leapPositionToWorldPosition(const glm::vec3& leapPosition);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,6 +20,8 @@ class HandData {
|
||||||
public:
|
public:
|
||||||
HandData(AvatarData* owningAvatar);
|
HandData(AvatarData* owningAvatar);
|
||||||
|
|
||||||
|
// These methods return the positions in Leap-relative space.
|
||||||
|
// To vonvert to world coordinates, use Hand::leapPositionToWorldPosition.
|
||||||
const std::vector<glm::vec3>& getFingerTips() const { return _fingerTips; }
|
const std::vector<glm::vec3>& getFingerTips() const { return _fingerTips; }
|
||||||
const std::vector<glm::vec3>& getFingerRoots() const { return _fingerRoots; }
|
const std::vector<glm::vec3>& getFingerRoots() const { return _fingerRoots; }
|
||||||
const std::vector<glm::vec3>& getHandPositions() const { return _handPositions; }
|
const std::vector<glm::vec3>& getHandPositions() const { return _handPositions; }
|
||||||
|
|
Loading…
Reference in a new issue