vertexcount += lines[y].length;
striplens[y] = lines[y].length;
}
// triangle array setup
TriangleStripArray strip = new TriangleStripArray(vertexcount,
TriangleStripArray.COORDINATES |
TriangleStripArray.NORMALS |
TriangleStripArray.TEXTURE_COORDINATE_2, striplens);
// position of the data in in the strip data space
int strippos = 0;
// copy the vertex data into the strip
for(int y=0;y < 8;y++){
strip.setCoordinates(strippos, lines[y]);
strippos += lines[y].length;
// generate normals
//TODO: READ normals?
Vector3f normals[] = CreateNormalsStripLineOfY(hf,y);
// and copy them into the strip
strip.setNormals(y * normals.length, normals);
// generate texture coordinates
TexCoord2f texcoords[] = CreateTextureCoordinatesStripLineOfY(hf,y,1f);
strip.setTextureCoordinates(0, y * texcoords.length, texcoords);
}
// polygon mode
polyAttr = new PolygonAttributes();