Change Mesh on the fly

Hello,



Does anyone know how I can change my mesh of a geometry object on the fly without causing an exception? Do I have to invalidate the mesh before I set a new one? Of course, I do it in the queue. My code looks something like this.



[java]

PraxitelesApplication.findInstance().getApplication().enqueue(new Callable() {

@Override

public Object call() throws Exception {

//The mesh of the geometry object is set to null

((PraxitelesGeometry) getNetcrystalsParent()).getSpatial().setMesh(null);

//The new mesh is set

((PraxitelesGeometry) getNetcrystalsParent()).getSpatial().setMesh(getMesh());

//Update

((PraxitelesGeometry) getNetcrystalsParent()).getSpatial().updateGeometricState();

return null;

}

});

[/java]



Thanks a lot.



Regards,

Equi

Just dont set null, directly set the other Mesh. And please, please never call spatial.updateGeometricState().

okidoki



cool forum → fast answer → like this very much.



regards,

equi