-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2754: Revert Entity::bounds() to returning the definition bounds. #2761
Conversation
Add a new Node::cullingBounds() that includes the model bounds. Fixes #2754
That should be everything. Was wondering if we should rename This stuff: Object::contains, Object::intersects, BoundsIntersectsNodeVisitor, CollectTouchingNodesVisitor, is using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve of the changes, but object to the naming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to have this clarified finally.
Add a new Node::cullingBounds() that includes the model bounds.
I need to add some docs, but this is what I had in mind in the comment here: #2754 (comment)
cullingBounds() is always equal or larger than bounds(). Currently, the only place where it differs from bounds() is it includes entity models that extend beyond the entity definition bounds, like monster_boss. The only place it's used is for AABB tree insertions.
Entity::definitionBounds could be dropped and replaced with bounds() now.
I should double check the codebase for any uses of
bounds()
that should be changed tocullingBounds()
, but this seems to work.Fixes #2754