Hi Zhu,

How to set the normals of IndexedGeometry ?

You can use com.sun.j3d.utils.geometry.NormalGenerator
But then you have to build the geometry with GeometryInfo.

GeometryInfo gi = new GeometryInfo(GeometryInfo.TRIANGLE_ARRAY) ;
gi.setCoordinates(coordinates);
gi.setCoordinateIndices(indices);

NormalGenerator ng = new NormalGenerator();
ng.generateNormals(gi);

Stripifier st = new Stripifier(); // Eventually
st.stripify(gi);

IndexedGeometryArray ig = gi.getIndexedGeometryArray(true);


Hope this helps.

R�mi Koutcherawy

===========================================================================
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".

Reply via email to