Skip to content

Commit

Permalink
#5708: Merge action nodes return an identity transform and the affect…
Browse files Browse the repository at this point in the history
…ed node's world AABB.

This fixes the wrong workzone calculation on selecting such one of the merge wrapper nodes.
  • Loading branch information
codereader committed Aug 28, 2021
1 parent e8baad2 commit 805ecc0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libs/scene/merge/MergeActionNode.cpp
Expand Up @@ -78,7 +78,14 @@ bool MergeActionNodeBase::supportsStateFlag(unsigned int state) const

const AABB& MergeActionNodeBase::localAABB() const
{
return _affectedNode->localAABB();
// We report the contained node's world AABB and an identity transform
return _affectedNode->worldAABB();
}

const Matrix4& MergeActionNodeBase::localToWorld() const
{
// We report the contained node's world AABB and an identity transform
return Matrix4::getIdentity();
}

void MergeActionNodeBase::renderSolid(RenderableCollector& collector, const VolumeTest& volume) const
Expand Down
1 change: 1 addition & 0 deletions libs/scene/merge/MergeActionNode.h
Expand Up @@ -48,6 +48,7 @@ class MergeActionNodeBase :
bool supportsStateFlag(unsigned int state) const override;

const AABB& localAABB() const override;
const Matrix4& localToWorld() const override;

void renderSolid(RenderableCollector& collector, const VolumeTest& volume) const override;
void renderWireframe(RenderableCollector& collector, const VolumeTest& volume) const override;
Expand Down

0 comments on commit 805ecc0

Please sign in to comment.