7daefd730b2c16c52f27bf9d5cf8adf17e4de41f
Part of #118145. These days we aren't really benefiting from making PBVH an opaque type. As we remove its responsibilities to focus it on being a BVH tree and look to improve performance with data-oriented design, that will only become more true. There are some other future developments the current header structure makes difficult: - Storing selections of nodes with `IndexMask` for simpler iteration, etc. - Specialization of node type for each PBVH type - Reducing overhead of access to node data as nodes get smaller - General C++ cleanliness and consistency This PR moves `PBVH` to `blender::bke::pbvh::Tree` and moves `PBVHNode` to `blender::bke::pbvh::Node`. Both are classes visible to elsewhere in Blender but with private data fields. The difficult part about the change is that we're in the middle of a transition removing data from PBVH. Rather than making some data truly private I chose to just give it the `_` suffix, since it will ideally be removed later. Other things should be class methods or implemented as part of friend classes. But the "fake" private status is much simpler for now and avoids increasing the scope of this PR too much. Though that's a bit ugly, there's a straightforward way to resolve these issues-- it just looks like the sort of inconsistency you'd expect in the middle of a large refactor. Pull Request: https://projects.blender.org/blender/blender/pulls/124919
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
