from this Optimization page ,
I see there is a GeometryBatchFactory class .
But i cant seem to use it since it wont recognize it .
Is there a library i need to import ?
Thank you for any help
from this Optimization page ,
I see there is a GeometryBatchFactory class .
But i cant seem to use it since it wont recognize it .
Is there a library i need to import ?
Thank you for any help
Hi,
the easiest way is to use the BatchNode. It is a simple Node where you can add more Nodes or Geometry.
After you have added what you want, you have to call .batch();
Code example:
[java]
BatchNode node = new Node(“Node”);
rootNode.attachChild(batch);
node.attachChild(CHILD);
node.batch();
[/java]
There are some disadvantages:
Another way is to use the GeometryBatchFactory as you can see right here: http://hub.jmonkeyengine.org/forum/topic/how-to-use-geometrybatchfactory-correctly/
But this only works if your geometry objects has the same material.
@alrik said: But this only works if your geometry objects has the same material.
Note: that if none of your geometry has the same material then batch node won’t do anything for you either.
To the OP, since you can’t seem to find the class it sound like you might be running an old version of the SDK. Make sure you are up to date with RC2.
Thank you @alrik.
@pspeed - I am using RC2.
Imported the jme3-terrain library and now it works thx
what im trying to do is optimize a floor node (which is build from cubes put together )
if ill optimize that node , will ill still be able to check collition against each cube?(to find the collition cube?
@Drau said: Thank you @alrik.@pspeed - I am using RC2.
Imported the jme3-terrain library and now it worksthx
what im trying to do is optimize a floor node (which is build from cubes put together )
if ill optimize that node , will ill still be able to check collition against each cube?(to find the collition cube?
Just in case it needs saying: block worlds are not made of cubes.