mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-05 11:40:36 +02:00
also fix joint simulation from 3rd party editors
This commit is contained in:
parent
759fac228c
commit
4ebb114a8e
3 changed files with 30 additions and 4 deletions
|
@ -795,6 +795,27 @@ bool RenderableModelEntityItem::setAbsoluteJointTranslationInObjectFrame(int ind
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RenderableModelEntityItem::setJointRotations(const QVector<glm::quat>& rotations) {
|
||||||
|
ModelEntityItem::setJointRotations(rotations);
|
||||||
|
_needsJointSimulation = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderableModelEntityItem::setJointRotationsSet(const QVector<bool>& rotationsSet) {
|
||||||
|
ModelEntityItem::setJointRotationsSet(rotationsSet);
|
||||||
|
_needsJointSimulation = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderableModelEntityItem::setJointTranslations(const QVector<glm::vec3>& translations) {
|
||||||
|
ModelEntityItem::setJointTranslations(translations);
|
||||||
|
_needsJointSimulation = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderableModelEntityItem::setJointTranslationsSet(const QVector<bool>& translationsSet) {
|
||||||
|
ModelEntityItem::setJointTranslationsSet(translationsSet);
|
||||||
|
_needsJointSimulation = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void RenderableModelEntityItem::locationChanged() {
|
void RenderableModelEntityItem::locationChanged() {
|
||||||
EntityItem::locationChanged();
|
EntityItem::locationChanged();
|
||||||
if (_model && _model->isActive()) {
|
if (_model && _model->isActive()) {
|
||||||
|
|
|
@ -69,6 +69,11 @@ public:
|
||||||
virtual bool setAbsoluteJointRotationInObjectFrame(int index, const glm::quat& rotation) override;
|
virtual bool setAbsoluteJointRotationInObjectFrame(int index, const glm::quat& rotation) override;
|
||||||
virtual bool setAbsoluteJointTranslationInObjectFrame(int index, const glm::vec3& translation) override;
|
virtual bool setAbsoluteJointTranslationInObjectFrame(int index, const glm::vec3& translation) override;
|
||||||
|
|
||||||
|
virtual void setJointRotations(const QVector<glm::quat>& rotations) override;
|
||||||
|
virtual void setJointRotationsSet(const QVector<bool>& rotationsSet) override;
|
||||||
|
virtual void setJointTranslations(const QVector<glm::vec3>& translations) override;
|
||||||
|
virtual void setJointTranslationsSet(const QVector<bool>& translationsSet) override;
|
||||||
|
|
||||||
virtual void loader() override;
|
virtual void loader() override;
|
||||||
virtual void locationChanged() override;
|
virtual void locationChanged() override;
|
||||||
|
|
||||||
|
|
|
@ -120,10 +120,10 @@ public:
|
||||||
virtual glm::vec3 getJointPosition(int jointIndex) const { return glm::vec3(); }
|
virtual glm::vec3 getJointPosition(int jointIndex) const { return glm::vec3(); }
|
||||||
virtual glm::quat getJointRotation(int jointIndex) const { return glm::quat(); }
|
virtual glm::quat getJointRotation(int jointIndex) const { return glm::quat(); }
|
||||||
|
|
||||||
void setJointRotations(const QVector<glm::quat>& rotations);
|
virtual void setJointRotations(const QVector<glm::quat>& rotations);
|
||||||
void setJointRotationsSet(const QVector<bool>& rotationsSet);
|
virtual void setJointRotationsSet(const QVector<bool>& rotationsSet);
|
||||||
void setJointTranslations(const QVector<glm::vec3>& translations);
|
virtual void setJointTranslations(const QVector<glm::vec3>& translations);
|
||||||
void setJointTranslationsSet(const QVector<bool>& translationsSet);
|
virtual void setJointTranslationsSet(const QVector<bool>& translationsSet);
|
||||||
QVector<glm::quat> getJointRotations() const;
|
QVector<glm::quat> getJointRotations() const;
|
||||||
QVector<bool> getJointRotationsSet() const;
|
QVector<bool> getJointRotationsSet() const;
|
||||||
QVector<glm::vec3> getJointTranslations() const;
|
QVector<glm::vec3> getJointTranslations() const;
|
||||||
|
|
Loading…
Reference in a new issue