if( VEGETATION_RENDER )
processMap();
this.lockTransforms();
}
private void processMap(){
SharedNode s = null;
Random rand = new Random();
int id = 0;
for(float x = 0; x < Math.sqrt(this.vegetationMap.length); x++)
{
for(float z = 0; z < Math.sqrt(this.vegetationMap.length); z++)
{
if( id >= this.vegetationMap.length )
break;
s = VegetationBank.getNewSharedVegetation(this.vegetationMap[id]);
s.setLocalTranslation((x*VEGETATION_STEP)*VEGETATION_PACK_SIZE, 55, (z*VEGETATION_STEP)*VEGETATION_PACK_SIZE);
s.getLocalTranslation().y = getYat(s.getLocalTranslation().x, s.getLocalTranslation().z);
VEGETATION_AVERAGE_COUNTER++;
this.attachChild(s);
s.lockMeshes();
id++;
}
}
this.lockMeshes();