From d520adba98b819db8deb5cfef82b66b716471057 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 2 Jan 2014 09:31:24 -0800 Subject: [PATCH] exposed getVelocity() and findSpherePenetration() in Avatar base class --- libraries/avatars/src/AvatarData.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 7ebf12616d..1dd5dacafe 100755 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -41,6 +41,8 @@ enum KeyState DELETE_KEY_DOWN }; +const glm::vec3 vec3Zero(0.0f); + class JointData; class AvatarData : public NodeData { @@ -103,6 +105,17 @@ public: void setHeadData(HeadData* headData) { _headData = headData; } void setHandData(HandData* handData) { _handData = handData; } + + virtual const glm::vec3& getVelocity() const { return vec3Zero; } + + /// Checks for penetration between the described sphere and the avatar. + /// \param penetratorCenter the center of the penetration test sphere + /// \param penetratorRadius the radius of the penetration test sphere + /// \param penetration[out] the vector in which to store the penetration + /// \param skeletonSkipIndex if not -1, the index of a joint to skip (along with its descendents) in the skeleton model + /// \return whether or not the sphere penetrated + virtual bool findSpherePenetration(const glm::vec3& penetratorCenter, float penetratorRadius, + glm::vec3& penetration, int skeletonSkipIndex = -1) { return false; } protected: QUuid _uuid;