> From: Monique Jeger <[EMAIL PROTECTED]>
> Subject: [JAVA3D] QuadArray class

>
> I'd like to map a different texture on each face of a cube. To my disposal I
> have
> the 8 cube's vertices v1, ... ,v8 and I define the 6 faces of the cube with
> an
> array of 6 time 4 = 24 Point3f, I also have 6 different texture objects.
> To do that I'd like to use the the folloing constructor of the QuadArray
> class
>
>
> QuadArray(int vertexCount, int vertexFormat, int texCoordSetCount, int[]
> texCoordSetMap)
>
>
> How do I write the texCoordSetMap parameter and how to create the necessary
> "texture coordinate sets" ?

 The simple way to solve this problem is just to have a different Shape3D for
each quad and then have each Shape3D have a different texture.

The texCoordSetMap[] constructor is intendend for multi-texturing, where more
than one texture is applied to the surface.  You could use this constructor to
apply all 8 textures to each face of your cube, but not to make each cube use a
different texture.

If you really need to have all the quads in one shape, perhaps you can combine
the 8 textures into a single image and then use the texture coordinates to
select between the textures.

Doug Gehringer
Sun Microsystems

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