Repository navigation
Conversation
NodeBBox_test covers how a node bbox is computed or kept: - computedBBoxFollowsObjects: without a given bbox, it is computed at init and follows the objects when they move; - bboxSetBeforeInitIsKept / bboxSetAfterInitIsKept: a bbox written after the node creation (e.g. `root.bbox = ...` from Python, or from a controller) is kept by init and by UpdateBoundingBoxVisitor; - bboxFromSceneAttributeIsKeptAndIncludedInParent: a bbox given as a scene attribute (Node::parse) is kept, and the computed bbox of the parent includes it along with its computed siblings. bboxSetBeforeInitIsKept and bboxSetAfterInitIsKept fail at this commit: a bbox written after the node creation is overwritten. Fixed by the next commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(This PR is just here to showcase the next PR about fixing Node's bbox)
Add 4 unit tests about setting nodes' bbox :
computedBBoxFollowsObjectswithout a given bbox, it is computed at init and follows the objects when they move;bboxSetBeforeInitIsKept / bboxSetAfterInitIsKept: a bbox written after the node creation (e.g.root.bbox = ...from Python, or from a controller) is kept by init and by UpdateBoundingBoxVisitor;bboxFromSceneAttributeIsKeptAndIncludedInParent: a bbox given as a scene attribute (Node::parse) is kept, and the computed bbox of the parent includes it along with its computed siblings.bboxSetBeforeInitIsKept and bboxSetAfterInitIsKept fail in this branch: a bbox written after the node creation is overwritten.
[with-all-tests]
By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).
Reviewers will merge this pull-request only if