mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 20:15:15 +02:00
exposed getVelocity() and findSpherePenetration() in Avatar base class
This commit is contained in:
parent
5843c745cb
commit
d520adba98
1 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue