Hi all,
I'm a newbie to jME that touched 1.0 briefly, but then decided to jump in feet-first to 2.0. I've worked my way through most of the tutorials without too much trouble, but now I'm trying to look at StrategicHandler and the Mahjongg project. I've been able to work through most of the compiler errors (the move to enums is the source of most of them, but it lets me appreciate the improvements being done to the engine), but the GeomBatch ones have me a bit worried. I've got 2.0 in Eclipse, but I'm looking at 1.0 through the CVS web browser, so it's hard to get the big picture. As far as I can tell, Geometry used to have multiple batches of triangles, but now has only one, so code that used to iterate through each batch and do something to it, should just do that something to the Geometry itself? For instance:
public void updateData( TriMesh mesh ) {
int totalVerticesLength = 0;
int totalIndicesLength = 0;
// Walk batches and count indices and vertices
for ( int batchIndex = 0; batchIndex < mesh.getBatchCount(); batchIndex++ ) {
TriangleBatch batch = mesh.getBatch( batchIndex );
totalVerticesLength += ( batch.getVertexCount() * 3 );
totalIndicesLength += ( batch.getTriangleCount() * 3 );
}
should now be:
public void updateData( TriMesh mesh ) {
int totalVerticesLength = 0;
int totalIndicesLength = 0;
totalVerticesLength = mesh.getVertexCount() * 3;
totalIndicesLength = mesh.getTriangleCount() * 3;
Am I close or am I way out in left field?
Thanks,
Mike