Skip to content
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

BVH templated mask checks and generic NUM_TREES #55640

Merged
merged 1 commit into from Jan 21, 2022

Commits on Jan 21, 2022

  1. BVH templated mask checks and generic NUM_TREES

    Refactors the BVH to make it more generic and customizable. Instead of hard coding the system of pairable_mask and pairable_type into the BVH, this information is no longer stored internally, and instead the BVH uses callbacks both for determining whether pairs of objects can pair with each other, and for filtering cull / intersection tests.
    
    In addition, instead of hard coding the number of trees, the BVH now supports up to 32 trees, and each object can supply a tree collision mask to determine which trees it can collide against.
    
    This enables the BVH to scale to either the two or 3 trees needed in physics, and the single tree used without pairing in Godot 4 render tree.
    lawnjelly committed Jan 21, 2022
    Configuration menu
    Copy the full SHA
    dc14636 View commit details
    Browse the repository at this point in the history