Gernot,
I have played around with your example, and found the same problem. The
bounds of a node are always returned as a sphere. I think that Java3D is
automatically converting the boundingBox to a sphere as soon as it is
assigned...I'm not sure if this is intentional or an error.
Note that the radius of the returned sphere is not half that of the
boundingBox's diameter, but the distance from the computed center of the box
to the furthest most point within the box (i.e. the upper or lower
ound). - this is illustrated in the attached diagram. It would be
interesting to see if the boundingBox bounds still apply (even though a
sphere's bounds are returned)...or if the sphere is used instead....
Regards,
Andy Phelps
-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]]
On Behalf Of Veith, Gernot
Sent: 17 June 1999 08:20
To: [EMAIL PROTECTED]
Subject: Bounds settings (once more)
<< File: TestCase.java >> > Hi all,
>
> I have to set a node's bounds as a boundingBox. Although I've set the
> according capability ALLOW_AUTO_COMPUTE_BOUNDS_WRITE and
> setBoundsAutoCompute() to false, I get a sphere and not a box when I read
> the bounds from the running app.
> The sphere's radius is half the diameter of the assigned box, that's ok :)
> but not what I supposed to get.
>
> Is there any chance at all to keep a node's bounds as box or a polytope ?
>
> To verify that, you can try the attached source code. I've modified the
> HelloUniverse example. It now has one more Group node and its bounds are
> set and printed out continuously with a timer.
>
> thanks for any hints :)
> <<TestCase.java>>
>
> Gernot Veith
> [EMAIL PROTECTED]
> www.janet.de
>
box.gif