Hello.
I have several problems with my simulator.
I have to create a large number of 3D objects (about 50000).
when the program runs I receive the following error message:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.threed.jpct.Vectors.<init>(Unknown Source)
at com.threed.jpct.Object3D.init(Unknown Source)
at com.threed.jpct.Object3D.<init>(Unknown Source)
at com.threed.jpct.Primitives.createLatheObject(Unknown Source)
at com.threed.jpct.Primitives.getEllipsoid(Unknown Source)
at com.threed.jpct.Primitives.getSphere(Unknown Source)
at com.threed.jpct.Primitives.getSphere(Unknown Source)
The Object3D are spheres. I've tryed to use this configuration parameters:
Config.glAvoidTextureCopies = true;
Config.saveMemory=true;
Config.maxPolysVisible = 512000;
Config.useMultipleThreads=true;
I tryed to reduce the number of Objs to 500, but I receive the same error message.
Then, if I set Config.maxPolysVisible = 128000; (instead of 512000), the program runs, but I receive the WARNING: You've exceeded the configured triangle limit for the visibility list. Consider adjusting Config.maxPolysVisible!
In any case there is no way to get it working with 50000 objects...
Any ideas?
Thanks.