Excuse my impertinence on the bounds topic.
Could somebody from the Java3D-Team or anybody
else explain the miracle of bounds objects.

How does Java3D compute bounds ?
Why are setBounds() Operations ignored?

The following code snippet reveals strange results
(at least for my) in a live scenegraph.

Any help would be appreciated!

Thanx Joerg

Here we go:

// Sphere created with: sphere = new Sphere(0.2f)
// Capability Bits set

BoundingSphere sb = new BoundingSphere(new Point3d(0f,0f,0f),0.2d);
System.out.println("Created Bounding Sphere: "+  sb.toString());
sphere.setBounds(sb);
System.out.println("Sphere Bounds:" + sphere.getBounds().toString());
sb = (BoundingSphere) sphere.getBounds();
sb.setRadius(4d);
System.out.println("Changed Bounding Sphere: "+  sb.toString());
sphere.setBounds(sb);
System.out.println("Sphere Bounds:" + sphere.getBounds().toString());

And here are the results:

Created Bounding Sphere: Center=(0.0, 0.0, 0.0)  Radius=0.2

Sphere Bounds:           Center=(0.0, 1.3307424243170417E-19,
-0.0021732673048973083)
                         Radius=0.34326929992848926

Changed Bounding Sphere: Center=(0.0, 1.3307424243170417E-19,
-0.0021732673048973083)
                         Radius=4.0

Sphere Bounds:           Center=(0.0, 1.3307424243170417E-19,
-0.0021732673048973083)
                         Radius=0.34326929992848926

===========================================================================
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".

Reply via email to