You could just do a p1.distance(p2)  where p1 is your location and p2 is the
location of the tree.  But have you tried to use ordered groups for this
yet?  To my knowledge you cannot swap the children of an ordered group
around, you have to detach them and rebuild the array.  I have been building
triangle meshes to perfectly match the outlines of my trees to solve this
problem, and using less polygons futher away to reduce the amount of
triangles the engine has to process per frame.  But I would rather use
transparency, if only it worked.

Dave Yazel

> ----------
> From:         Hongkun Wang[SMTP:[EMAIL PROTECTED]]
> Reply To:     Hongkun Wang
> Sent:         Friday, September 08, 2000 10:24 AM
> To:   [EMAIL PROTECTED]
> Subject:      [JAVA3D] Easy way to get 'Z' coordinate in 'ViewPlatform
> Coordinate Sys' ?
>
> Hi!
>
> I am creating a terrain with many billboard trees on it. Due to the
> problems of 'Multiple Transparent Objs', I decide to use OrderedGroup, and
> sort the trees according to their 'Z' coordinate at run time.
>
> So my question is:
> Is there an easy and universal way to quickly get objects 'Z' coordinate
> in ViewPlatform coordinate system? Otherwise we have to do a lot of Matrix
> calculation.
>
> Thanks for any help in advance.
> Hongkun Wang
>

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