mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
add a getParentTree call for overlays
This commit is contained in:
parent
23f41457be
commit
54204833df
2 changed files with 9 additions and 1 deletions
|
@ -299,3 +299,9 @@ Transform Base3DOverlay::evalRenderTransform() {
|
|||
void Base3DOverlay::setRenderTransform(const Transform& transform) {
|
||||
_renderTransform = transform;
|
||||
}
|
||||
|
||||
SpatialParentTree* Base3DOverlay::getParentTree() const {
|
||||
auto entityTreeRenderer = qApp->getEntities();
|
||||
EntityTreePointer entityTree = entityTreeRenderer ? entityTreeRenderer->getTree() : nullptr;
|
||||
return entityTree.get();
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
virtual AABox getBounds() const override = 0;
|
||||
|
||||
void update(float deltatime) override;
|
||||
|
||||
|
||||
void notifyRenderTransformChange() const;
|
||||
|
||||
void setProperties(const QVariantMap& properties) override;
|
||||
|
@ -67,6 +67,8 @@ public:
|
|||
return findRayIntersection(origin, direction, distance, face, surfaceNormal);
|
||||
}
|
||||
|
||||
virtual SpatialParentTree* getParentTree() const override;
|
||||
|
||||
protected:
|
||||
virtual void locationChanged(bool tellPhysics = true) override;
|
||||
virtual void parentDeleted() override;
|
||||
|
|
Loading…
Reference in a new issue