Class SimpleBatchNode

All Implemented Interfaces:
HasLocalTransform, CloneableSmartAsset, Collidable, Savable, JmeCloneable, Cloneable

public class SimpleBatchNode extends BatchNode
SimpleBatchNode comes with some restrictions, but can yield better performances. Geometries to be batched has to be attached directly to the BatchNode You can't attach a Node to a SimpleBatchNode SimpleBatchNode is recommended when you have a large number of geometries using the same material that does not require a complex scene graph structure.
See Also:
  • Constructor Details

    • SimpleBatchNode

      public SimpleBatchNode()
    • SimpleBatchNode

      public SimpleBatchNode(String name)
  • Method Details

    • attachChild

      public int attachChild(Spatial child)
      Description copied from class: Node
      attachChild attaches a child to this node. This node becomes the child's parent. The current number of children maintained is returned.
      If the child already had a parent it is detached from that former parent.
      Overrides:
      attachChild in class Node
      Parameters:
      child - the child to attach to this node.
      Returns:
      the number of children maintained by this node.
    • setTransformRefresh

      protected void setTransformRefresh()
      Description copied from class: Spatial
      Indicate that the transform of this spatial has changed and that a refresh is required.
      Overrides:
      setTransformRefresh in class Node
    • getTransformMatrix

      protected Matrix4f getTransformMatrix(Geometry g)
      Overrides:
      getTransformMatrix in class BatchNode
    • batch

      public void batch()
      Description copied from class: BatchNode
      Batch this batchNode every geometry of the sub scene graph of this node will be batched into a single mesh that will be rendered in one call
      Overrides:
      batch in class BatchNode