mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 02:53:43 +02:00
3d-model overlays can now be children
This commit is contained in:
parent
15e2140cb2
commit
c363ca9887
2 changed files with 11 additions and 0 deletions
|
@ -178,3 +178,12 @@ bool ModelOverlay::findRayIntersectionExtraInfo(const glm::vec3& origin, const g
|
|||
ModelOverlay* ModelOverlay::createClone() const {
|
||||
return new ModelOverlay(this);
|
||||
}
|
||||
|
||||
void ModelOverlay::locationChanged(bool tellPhysics) {
|
||||
Base3DOverlay::locationChanged(tellPhysics);
|
||||
|
||||
if (_model && _model->isActive()) {
|
||||
_model->setRotation(getRotation());
|
||||
_model->setTranslation(getPosition());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,8 @@ public:
|
|||
virtual bool addToScene(Overlay::Pointer overlay, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges) override;
|
||||
virtual void removeFromScene(Overlay::Pointer overlay, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges) override;
|
||||
|
||||
void locationChanged(bool tellPhysics) override;
|
||||
|
||||
private:
|
||||
|
||||
ModelPointer _model;
|
||||
|
|
Loading…
Reference in a new issue