Osama,

You need to create triangles anyway. What you could do is index
your points at that plane (pb[0], pb[1], etc. and create the same array
of indexed points at a plane at a distance "length" above the first plane.
The best you could do is to number that second array of points as
e.g: pt[0],pt[1] and so on. After, you have to create a loop to build
your triangles, kind like:

j=0;
for(i=0;i<maxnr-1;i+=2)
     {
     arrpt[j    ]=pb[i];
     arrpt[j+1]=pb[i+1];
     arrpt[j+2]=pt[i];
     arrpt[j+3]=pt[i];
     arrpt[j+4]=pb[i+1];
     arrpt[j+5]=pt[i+1];
     j+=6;
     }

This for a TriangleArray. There may be better ways, perhaps using
indexed arrays etc. However, you should keep in mind that it is
important to create the points in a counterclockwise direction. Also
you should create your normals in this loop.

If you think this is the right way to go, please, let me know how it
finally worked.

Success, Dirk

----- Original Message -----
From: "Osama Abdalah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 06, 2003 8:22 AM
Subject: [JAVA3D] Extruded Shape


> Hi All,
>   Iam developing an Extruded shape class in which i
> give it an array of points that lie on the same plane
> and a length for the extruded shape can any one tell
> me how to begin packing the points into Geometry
> noting that the array of points provided may be more
> than four points and adding proper textures to
> it(Normals).
>                            Best Regards
>
>
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
>
>
===========================================================================
> 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