Reputation: 21
Uhm, what exactly does the bounding sphere in Java 3D do?
Upvotes: 0
Views: 1958
Reputation: 114777
For every 3D geometry we can calculate a sphere so that all points of the given geometry are inside the sphere. That's a bounding sphere.
Upvotes: 0
Reputation: 339816
In general terms (not specific to Java 3D), a bounding object is a "simple" object that is guaranteed to completely enclose some other objects.
By perform relatively inexpensive intersection tests on the bounding object a renderer can avoid performing any expensive intersection tests on any of those enclosed objects.
The bounding object doesn't appear within the scene - its sole purpose is for this optimising away of intersection tests.
For example, I might have a complicated shape made out of thousands of polygons. In the absence of any other optimisations, I'd have to test every single polygon to check whether it's visible or not. With a bounding sphere, if the sphere isn't "visible", then neither are any of those polygons.
Upvotes: 3