|
|
|
@ -50,19 +50,19 @@ import java.util.logging.Level; |
|
|
|
|
import java.util.logging.Logger; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* BatchNode holds geometrie that are batched version of all geometries that are in its sub scenegraph. |
|
|
|
|
* BatchNode holds geometries that are a batched version of all the geometries that are in its sub scenegraph. |
|
|
|
|
* There is one geometry per different material in the sub tree. |
|
|
|
|
* this geometries are directly attached to the node in the scene graph. |
|
|
|
|
* usage is like any other node except you have to call the {@link #batch()} method once all geoms have been attached to the sub scene graph and theire material set |
|
|
|
|
* The geometries are directly attached to the node in the scene graph. |
|
|
|
|
* Usage is like any other node except you have to call the {@link #batch()} method once all the geometries have been attached to the sub scene graph and their material set |
|
|
|
|
* (see todo more automagic for further enhancements) |
|
|
|
|
* all the geometry that have been batched are set to {@link Spatial.CullHint#Always} to not render them. |
|
|
|
|
* the sub geometries can be transformed as usual their transforms are used to update the mesh of the geometryBatch. |
|
|
|
|
* sub geoms can be removed but it may be slower than the normal spatial removing |
|
|
|
|
* Sub geoms can be added after the batch() method has been called but won't be batched and will be rendered as normal geometries. |
|
|
|
|
* All the geometries that have been batched are set to {@link CullHint#Always} to not render them. |
|
|
|
|
* The sub geometries can be transformed as usual, their transforms are used to update the mesh of the geometryBatch. |
|
|
|
|
* Sub geoms can be removed but it may be slower than the normal spatial removing |
|
|
|
|
* Sub geoms can be added after the batch() method has been called but won't be batched and will just be rendered as normal geometries. |
|
|
|
|
* To integrate them in the batch you have to call the batch() method again on the batchNode. |
|
|
|
|
* |
|
|
|
|
* TODO normal or tangents or both looks a bit weird |
|
|
|
|
* TODO more automagic (batch when needed in the updateLigicalState) |
|
|
|
|
* TODO more automagic (batch when needed in the updateLogicalState) |
|
|
|
|
* @author Nehon |
|
|
|
|
*/ |
|
|
|
|
public class BatchNode extends Node implements Savable { |
|
|
|
|