If I understand how things work, ulitmately I would like everything in my scenegraph to be bounded for performance purposes. However I don't want to be creating BoundingVolumes where they aren't required, so I have come to some conclusions and I am looking to see if they are accurate.
Here are my conclusions:
- Everything in the scenegraph that needs a BoundingVolume will be derived from either Geometry or Node (and ultimately Spatial). This assumes that I don't derive my own classes from Spatial.
- Nodes create their own WorldBounds based on the BoundingVolume of their first child merged with the BoundingVolumes of all subsequent children. Therefore setWorldBounds on a Node really doesn't do anything because the update of the worldBounds will override it.
- Geometry needs ModelBounds to ultimatly define their worldBounds, so setting worldBounds on these is worthless too, however the setting ModelBounds is important, as is updateModelBounds and updateWorldBounds so that the transforms are applied.
So, what I am sitting here wondering is when do I ever need to call setWorldBounds() on anything? Shouldn't I just make sure that I setModelBounds() on all my Geometry and update them as well as the updateWorldBounds() on all nodes (or the top-most one)?
I appologize if this doesn't make sense or is stupid, I guess I only post questions when my brain is spinning from all the different stuff that I am playing with and all the easy things all of a sudden become incomprehensible.
Lastly, as I try to do in all (3 or so) of my posts, I want to mention that the work of the jMonkey team is fantastic! Features of engines that one would pay $100K for would be nice, documentation of every thought in you collective brains would be nice, hell it would be nice if I won the lottery and drove a Ferrari. But the things being as they are - reality and all that - I think that what you produce is an incredible product. Some day I hope to be productive enough to contribute. Please keep up the good work it is all greatly appreciated.