Shape3D colors

Hi,

I created a new Shape3D in the exact same way that ColorCube is created (all I changed where the vertex locations). However, even though I give it an assigned array of colors upon creation, when I do theNewShape.setAppearance(app), it doesn’t change my shape’s appearance; the color stays the same as it was before. How do I fix this? Any suggestions?

–DAT

What parameters didi you use to create the appearance?

I set up my shape3d in this fashion:


TriangleArray triangle = new TriangleArray(24, TriangleArray.COORDINATEE      | TriangleArray.COLOR_3);
triangle.setCoordinates(0, verts);
triangle.setColors(0, colors);      

This is basically the same thing they did in ColorCube. I then use the triangle array to create a triangle shape class.

After creating an instance of the shape3d, I then set it to the following appearance properties:


app = new Appearance();
m = new Material(Arena3D.magenta, Arena3D.black, Arena3D.magenta, Arena3D.white, 80.0f);
m.setLightingEnable(true);
app.setMaterial(m);
triangleInstance.setAppearance(app);

where Arena3D.color are colors I define (and they do work on primitives and such).

I thought the vertex colors didn’t have any effect when lighting is enabled, but I could be wrong.

Hm, doing material.setLightingEnable(false) (sorry, forgot the exact syntax; not at my own computer now) doesn’t solve it. I wonder what’s wrong…