i already did it that way... but as i mentioned earlier... the returned BoundingBox has dimesions of width = height = depth it makes up the cube that fits exactly into the BoundingSphere... but some of my sceneobjects have dimension ratios like 1x5x2 .... that doesn�t look very nice, if You know what i mean... michy Rajesh Gupta wrote: > Hi Michael, > > You can construct a BoundingBox object from a BoundingSphere. One of the > BoundingBox constructors takes a Bounds object where you can pass in the > BoundingSphere. > If you want to implement a method, it would look like > > BoundingBox getBoxBounds() > { > return new BoundingBox( getBounds()); > } > > Though you may not like to do a new everytime, especially if you are calling > it lots of times. > > Hope it helps, > > Regards, > Rajesh Gupta > > ----- Original Message ----- > From: Michael Wilimsky <[EMAIL PROTECTED]> > To: Java3d <[EMAIL PROTECTED]> > Sent: Tuesday, April 13, 1999 12:30 PM > Subject: Re: [java3d] Bounds computing > > thanx for the info rajesh... > > do You know how i could get a boundingbox in return for my getBoundsMethod? > i > don�t want a > cube as Bounding Object for every scenegraph object.... > > the problem is, that i can�t override the final getBounds() method.... > > poohh... what do You think? > > michy > > Rajesh Gupta wrote: > > > Hi Michael, > > > > Don't know about J3D1.1.1, but till 1.1, even the BoundingBox was > internally > > stored as a BoundingSphere. And it is documented, where exactly, I will > have > > to look up. > > That probably explains your observation. > > > > Regards, > > Rajesh Gupta > > > > ----- Original Message ----- > > From: Michael Wilimsky <[EMAIL PROTECTED]> > > To: Java3d <[EMAIL PROTECTED]> > > Sent: Tuesday, April 13, 1999 12:09 PM > > Subject: [java3d] Bounds computing > > > > > I need help! > > > > > > everytime I call the getBounds()-method of my SceneGraphObjects i get a > > > BoundingSphere-Object... > > > even if i set the Bounds as a BoundingBox Object : > > > > > > setBounds(new BoundingBox(new Point3d(x1, y1, z1), new Point3d(x2, y2, > > > z2))) > > > > > > but i would rather like to get a BoundingBox... > > > > > > what do i have to do ? > > > > > > michy > > > > > > ===================================================================== > > > To subscribe/unsubscribe, send mail to [EMAIL PROTECTED] > > > Java 3D Home Page: http://java.sun.com/products/java-media/3D/ > > > > > ======================= > To subscribe/unsubscribe, send mail to [EMAIL PROTECTED] > Java 3D Home Page: http://java.sun.com/products/java-media/3D/
