This patch is an exploration of a few changes:
- More consistent handling of bounding boxes between object types
- Bounds cache is stored as min and max on object data
- Objects no longer have a bounding box pointer, instead the can generate a bounding box with the cached min and max on object data.
- API to retrieve a bounding box returns by value to make it clear there is no caching and to simplify code.
- BoundBox moves to BLI, since it is runtime data.
TODO/For futher investigation:
- Make sure the bounding box means the same thing on all object types (i.e. use the evaluated geometry set on relevant object types).
- Remove object level functions like BKE_hair_boundbox_get in favor of a single object level function and only "minmax" functions on object data.
- Split off a few cleanup changes
- Handle copying back to original data:
- SCULPT_update_object_bounding_box
- object_sync_boundbox_to_original
I'm posting this as a patch now to get more design feedback before
putting too much work into this.