This commit removes knowledge about face sets from the PBVH,
and changes iteration over faces to not depend on the PBVH face
iterator abstraction. Though this adds slightly more boilerplate to
iteration over faces, it makes the whole process more data oriented
and allows use of index-based utilities like `gather` and `scatter`
in the mesh case, and simpler iteration over BMesh faces for
dynamic topology.
Setting face sets is now specialized per PBVH type in a few places
in a similar way. The general goal is to reduce branching and function
calls at the lowest level of hot loops, and to make code more aware
of the data structures it uses, both for performance and clarity.
Since the remaining uses of the face iterator are removed,
the iterator itself is removed too.
Related commits:
- 97f2b01ea9
- 756dea7ca1
- a6a2af5fdd
Pull Request: https://projects.blender.org/blender/blender/pulls/114417