Lan,

You can create a Sphere object and get the geometry out of it by

sphere.getShape.getGeometry

type cast it to GeometryArray and call getCoordinates(0,double[]). This will
give you all the coordinates for the triangles created internally by sphere
class. Add the different center point coordinate in this array it will give
you the array of coordinates for the sphere drawn at specified position.
Reapeat this process for the number of sphere you want to create and finally
create the IndexedTriangleStripArray with these set of coords.

I'm not sure if it is the most efficient way of doing this. If you do not
have a large number of spheres(as I do) to be created, you can create the
sphere and just transform it to the specified center by using
TransformGroup.

regards,
nitin

> -----Original Message-----
> From: Lan Wu-Cavener [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 12:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] A basic doubt
>
>
> Hi,
>
> I have read all the responses of this "A basic doubt" series
> and learning a
> few new ideas. Forgive my newbie question.
>
> >Is it not possible to string several (hundreds of) spheres all in
> >one IndexedTriangleStripArray, and .......
>
>
> How do you string several spheres in one
> IndexedTriangleStripArray? Could
> you please show some pseudo code?
>
> Thanks!
> Lan
>
>
>
> Lan Wu-Cavener
> Research Associate and Programmer
> Dept. of Landscape Architecture
>
> ==============================================================
> =============
> 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