Does any one know IN DETAILS how to use the IndexTriangleArray (or say
IndesGeometryArray) class?
Simply spcifying a geometry with coordinates and coordinates index is easy.
What make me confused is how to specify the Normal, normal index, texture
coordinates and coordinate index.
For example, if I have a geometry with 20 veritces, 32 vertex indices and 50
normals and 50 texture coordinates and the corresponding arrays of coordinates
and indices.
that is:
int versCount = 20, IndicesCount = 32, normalCount = 50, TextureCount = 50;
float coord[20], texCoord[3*50], normal[2*50];
int normalInd[3*32], texCoordInd[3*32], coordInd[3*32];
I construct a shape3D with the following geometry class
IndexedTriangleArray partTriangles = new IndexedTriangleArray(vertsCount,
GeometryArray.COORDINATES | GeometryArray.TEXTURE_COORDINATE_2 |
GeometryArray.NORMALS, indicesCount);
partTriangles.setCoordinates(0, coord);
partTriangles.setCoordinateIndices(0, coordInd);
When I begin to set the normals for the geometry, I am not sure what the first
variable index in setNormals(index, norms) means. Should it be 32 (the vertex
indices) or 50 (the normal count)?
The same problem also apply to the specification of texture coordinates. That
is, in the method setTextureCoordinates(texCoordSet, index, texCoord) what the
index variable means? Furthermore, in Java3D1.2 there ia another variable
texCoordSet, what it is? In my case should it be 50 or anything else?
Thanks in advance
Liming
===========================================================================
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".