mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
for models, relay getJointRotation and getJointTranslation to the model
This commit is contained in:
parent
171f6da264
commit
a08bad8cbd
2 changed files with 24 additions and 0 deletions
|
@ -562,3 +562,23 @@ bool RenderableModelEntityItem::contains(const glm::vec3& point) const {
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
glm::quat getJointRotation(int index) const {
|
||||
if (_model) {
|
||||
glm::quat result;
|
||||
if (_model->getJointRotation(index, result)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return glm::quat();
|
||||
}
|
||||
|
||||
glm::vec3 getJointTranslation(int index) const {
|
||||
if (_model) {
|
||||
glm::vec3 result;
|
||||
if (_model->getJointTranslation(index, result)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return glm::vec3(0.0f);
|
||||
}
|
||||
|
|
|
@ -67,6 +67,10 @@ public:
|
|||
|
||||
virtual bool contains(const glm::vec3& point) const;
|
||||
|
||||
// these are in the frame of this object
|
||||
virtual glm::quat getJointRotation(int index) const;
|
||||
virtual glm::vec3 getJointTranslation(int index) const;
|
||||
|
||||
private:
|
||||
void remapTextures();
|
||||
|
||||
|
|
Loading…
Reference in a new issue