|
I'm a Java3D beginner and have a simle question to
you:
I expected that the following code with
stripVertexCounts = {4,3} to create two TriangleStripArrays with 4 and 3
vertexes. I set parameter vertexCount to the sum of vertexes (7). However I get
a error message "IllegalArgumentException: Illegal
stripVertexCounts".
Can anyone tell me what I did wrong? Thanx a lot.
Chris
int[] tab={4,3};
TriangleStripArray trStrip = new TriangleStripArray (7,TriangleStripArray.COORDINATES|TriangleStripArray.COLOR_3,tab); trStrip.setCoordinate(0,new Point3f(-0.8f,-0.8f,0f)); trStrip.setCoordinate(1,new Point3f(-0.5f,-0.8f,0f)); trStrip.setCoordinate(2,new Point3f(-0.5f,-0.2f,0f)); trStrip.setCoordinate(3,new Point3f(-0.2f,-0.2f,0f)); trStrip.setCoordinate(4,new Point3f(0.5f,0.8f,0f)); trStrip.setCoordinate(5,new Point3f(0.5f,0.2f,0f)); trStrip.setCoordinate(6,new Point3f(0.2f,0.2f,0f)); for(int i=0;i<7;i++) trStrip.setColor(i,new Color3f(1f,0f,1f)); |
