Maxim Tugai wrote:
sceneGraph.setBoundsAutoCompute(true);
BoundingBox graphBounds = new BoundingBox(sceneGraph.getBounds());
However, when I measuring the dimensions of graphBounds (using getLower()
and getUpper() methods), these dimensions are ALWAYS equal (width = height =
deep)!
Why? I know, that scenegraph does not have not cubic form, so its really
strange. And how I can get the real dimensions?
By default, java3d uses spheres for auto-calculated bounds. What you are
doing is creating bounding box of bounding sphere, which obviously is a
cube.
AFAIK, easiest way would be to traverse through all leafs of scenegraph
and combine their bounds with preallocated BoundingBox.
For traversing leaf nodes, you can use
com.sun.j3d.demos.utils.scenegraph.traverser.TreeScan
Artur
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".