Hi,
I managed to confuse myself.
Let's say we have the following two triangles, which happen to be at a 90
degree angle (about the axis BC) (and we want to show the crease). This
means the vertices B and C must have have two different normals associated
with each of them; when B and C are used in triangle ABC, then they have
the same normal as A; when they are used in triangle BCD, they have the
same normal as D.
B
/|\
/ | \
A/ | \D
\ | /
\ | /
\|/
C
In GeometryArray's (ex: TriangleArray's), each vertex normal is associated
with one vertex. This is simple, because if the same vertex is re-used
more than once it has to be repeated in the array. So the TriangleArray's
coordinates array contains 6 vertices, and the normals array contains 6
vectors.
However, in an IndexedTriangleArray, there should only be 4 vertices and 2
normals:
Coordinates: {A, B, C, D}
Normals: {ABC, BCD}
and the indices:
Coordinate indices: {0,1,2, 1,2,3}
Normal Indices: {0,0,0, 1,1,1}
Question 1: But from the (rather terse) J3D documentation, it seems that
the Normals array still must have 4 normals (since all the arrays
containing tuples must have the same length). Is this true?
In an IndexedTriangleStripArray, the coordinates would be the same
(keeping the answer to question 1 in mind), but the indices
would be:
Coordinate indices: {0,1,2, 3}
Normal indices: {???}
Question 2: does that mean the above 2 triangles can't be rendered as one
single strip and must be broken down into 2 strips? (I guess that's the
only way to assign two different normals with the same vertex).
Jimmy
===========================================================================
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".