Shape3D object not receiving lighting
I created a Shape3D object (a rectangle) out of a QuadArray, and it is behaving as though it has no Material, even though I gave it one set many of its properties.
I followed these steps:
-created a QuadArray with 4 points so as to form a rectangle.
-created an Appearance object
-created a Material object, and set its ambient color to bright red, its diffusive color to dark red, and its specular color to black.
-Set the appearances material to the one above, and then created a new Shape3d with its geometry being the QuadArray and its appearance being the one above.
-Added this Shape3D to a TransformGroup containing two spheres(Primitives) and a directional white light. All three objects are easily within range of the light's bounding sphere.
The lighting works perfectly on the spheres, which have their Material set to default values. However, the rectangle appears as one solid color, with no lighting effects. If I change its material's ColorAttributes, that works fine. Its as if its lighting is disabled, but I even setEnableLighting(true) for the material.
Is there some crucial step im missing here in order to make lighting work for this Shape3D?