Michael P. McCutcheon wrote:
If anyone is using X3D M6, you might be interested:
if(sgo instanceof Shape3D)
{
Shape3D s3d = (Shape3D)sgo;
Geometry g = s3d.getGeometry();
if(g instanceof GeometryArray)
{
GeometryArray ga = (GeometryArray)g;
int vertexCount = ga.getVertexCount();
float[] coords = new float[vertexCount];
ga.getCoordinates(0, coords);
GeometryInfo gInfo = new GeometryInfo(GeometryInfo.TRIANGLE_ARRAY);
gInfo.setCoordinates(coords);
NormalGenerator ng = new NormalGenerator();
ng.generateNormals(gInfo);
Stripifier st = new Stripifier();
st.stripify(gInfo);
s3d.setGeometry(gInfo.getGeometryArray());
}
}
A couple of comments on this. You have stripped away all texture
coordinate and color information, and regenerated the normals(ignoring
the VRML creaseAngle field). So as a general solution this will not be
enough. You might being seeing some performance improvement just by not
sending texture coordinate data over.
Currently Xj3D is not stripifying its data. We are still looking into
how best to represent the data. As a static solution this is fine, but
for dynamic content calling the stripifier every frame would suck.
--
Alan Hudson
President: Yumetech, Inc. http://www.yumetech.com/
Web3D Open Source Chair http://www.web3d.org/TaskGroups/source/
===========================================================================
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".