Hi,
I created a couple of TriangleStripArray objects and added
them into the java3d scene graph. The rendering is ok. But
whatever appearance I tried, they looked transparent! I don't
want them transparent. Somebody can tell me how to handle this.
Appreciate your help.
Mingtian Ni
The code I used is like this:
float[] vts = new float(3 * widht * height);
float[] normals = new float(3 * width * height);
int indices[];
int strips[];
// load vertices and normals here.
IndexedTriangleStripArray itsa = new
IndexedTriangleStripArray(width*height,
IndexedTriangleStripArray.COORDINATES|
IndexedTriangleStripArray.NORMALS|
IndexedTriangleStripArray.BY_REFERENCE,
indices.length,
strips);
itsa.setCoordRefFloat(vts);
itsa.setNormalRefFloat(normals);
itsa.setCoordinateIndices(0, indices);
itsa.setNormalIndices(0, indices);
Appearance app = new Appearance();
Material mm = new Material();
mm.setLightingEnable(true);
TransparencyAttributes ta = new TransparencyAttributes();
ta.setTransparencyMode(TransparencyAttributes.NONE);
app.setMaterial(mm);
app.setTransparencyAttributes(ta);
Shape3D sh = new Shape3D(itsa, app);
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".