Another Bounds update

Folks,



Rejoice, for you can now mix and match BoundingBox and BoundingSphere! (Although I would recommend sticking with one or the other for max efficiency.)



The way it works is as it merges bounds down the hierarchy tree, if a child bound is of a different type, it uses info from that bound to pretend it is of the same type and thus happily merges away. This means that if your root node uses BoundingSpheres and you have a MilkShape model in your scene, the model will have still use BoundingBoxes, but in merging for it’s parent, a BoundingSphere fitting your model will be used for calculations.



It’s best explained by an example. Load up PickTest and replace all BoundingBox with BoundingSphere. Run it and hit ‘b’ to display the bounds. You’ll see the mixing of box and sphere boundings. You’ll also notice that picking is still “box-accurate” on the model.



Enjoy!



Edit: who needs to spell correctly anyhow?

Great job Renanse. That alone will solve many questions people have.



I’m going to start working on setting the boundings for the model rather than hardcoding it to box. Anyways, bounds are looking great.