Uhm, w开发者_如何学运维hat exactly does the bounding sphere in Java 3D do?
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.
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.
精彩评论