Using java3d, how can I colorize not on a per vertex base but on a per face base?
I try to learn about java3d but what Shape3d I did produce does not look as expected. I
You will have to draw each face separately, assigning a color to each. For example:
Appearance polygon1Appearance = new Appearance();
// set your color here
QuadArray polygon1 = new QuadArray (4, QuadArray.COORDINATES);
polygon1.setCoordinate(0, new Point3f (0f, 0f, 0f));
polygon1.setCoordinate(1, new Point3f (2f, 0f, 0f));
polygon1.setCoordinate(2, new Point3f (2f, 3f, 0f));
polygon1.setCoordinate(3, new Point3f (0f, 3f, 0f));
objRoot.addChild(new Shape3D(polygon1, polygon1Appearance));