mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:51:20 +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;
|
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;
|
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:
|
private:
|
||||||
void remapTextures();
|
void remapTextures();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue