I keep putting this off myself.

Depending on the complexity of your application and the quality you want to
provide, you may need to break up your geometry into small pieces to sort it
right.  Also, center distance calculations might not be good enough if you
have non-symmetric alpha blended shapes near each other.  And there is no
facility to do an in-place sort of an ordered group right?  So you would
need to detach the branch group, build a new ordered group and reattach
branch group... all in one frame behavior?

Dave Yazel


> ----------
> From:         Fabrizio Nunnari[SMTP:[EMAIL PROTECTED]]
> Sent:         Friday, March 02, 2001 10:02 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: [JAVA3D] Range ordering of transparent objects
>
> On Fri, 2 Mar 2001, J. Lee Dixon wrote:
>
> > My problem is that I was expecting to make a call to Node.getBounds() to
> > find the distance between the viewer and the transparent node, but the
> > Bounds class has no generic way of getting the center of the bounds.
> > I've noticed that the Bounds are (so far) actually BoundingSpheres,
> > which I can get the center of.  But I shouldn't have to assume (or hope)
> > that the bounds are always BoundingSphere objects.
> >
> > Am I doing this the same way everybody else has done it??
>
> use:
> BoundingSphere bs = new BoundingSphere(Node.getBounds()) ;
>
> but maybe it's more efficient to use:
>
> Bounds b = Node.getBounds() ;
> BoundingSphere bs ;
> if(b instanceof BoundingSphere)
>         bs = (BoundingSphere)b ;
> else
>         bs = new BoundingSphere(b) ;
>
>
> The average should be better because if the bounds you get are already a
> sphere you avoid memory allocation.
>
>
> Fabrizio
>
> --
> http://digilander.iol.it/fnunnari
>
>    Fabrizio Nunnari <[EMAIL PROTECTED]>
>  -Student at Computer Science Department of Turin (Italy)-
> Voodoo Chile of DeGeNeRaTiOn  for the Amiga scene --> Coder
>
> ==========================================================================
> =
> 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".
>

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