int index = r.nextInt(5);
SharedMesh sharedMesh = new SharedMesh(triMesh[index].getName() + "_" + i, triMesh[index]);
sharedMesh.setLocalTranslation(r.nextInt(boxSize) - halfBoxSize + center.x, r.nextInt(boxSize) - halfBoxSize + center.y, r.nextInt(boxSize) - halfBoxSize + center.z);
sharedMesh.setLocalRotation(sharedMesh.getLocalRotation().fromAngles(r.nextInt(100), r.nextInt(100), r.nextInt(100)));
sharedMesh.setLocalScale(r.nextInt(50) * 0.1f);
MaterialState ms = renderer.createMaterialState();
linesPoint.add(sharedMesh.getLocalTranslation());
if (useTransparency) {
ms.setDiffuse(new ColorRGBA(r.nextInt(100) * 0.01f, r.nextInt(100) * 0.01f, r.nextInt(100) * 0.01f, (r.nextInt(40) + 60) * 0.01f));
} else {
ms.setDiffuse(new ColorRGBA(r.nextInt(100) * 0.01f, r.nextInt(100) * 0.01f, r.nextInt(100) * 0.01f, 1));
}
sharedMesh.setRenderState(ms);
sharedMesh.updateModelBound();
//sharedMesh.lock();
subNode[index].attachChild(sharedMesh);