com.jme3.scene
Class SimpleBatchNode

java.lang.Object
  extended by com.jme3.scene.Spatial
      extended by com.jme3.scene.Node
          extended by com.jme3.scene.BatchNode
              extended by com.jme3.scene.SimpleBatchNode
All Implemented Interfaces:
CloneableSmartAsset, Collidable, Savable, java.lang.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:
BatchNode

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme3.scene.BatchNode
BatchNode.Batch
 
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
Spatial.BatchHint, Spatial.CullHint
 
Field Summary
 
Fields inherited from class com.jme3.scene.BatchNode
batches, batchesByGeom
 
Fields inherited from class com.jme3.scene.Node
children
 
Fields inherited from class com.jme3.scene.Spatial
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_LIGHTLIST, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldTransform
 
Constructor Summary
SimpleBatchNode()
           
SimpleBatchNode(java.lang.String name)
           
 
Method Summary
 int attachChild(Spatial child)
          attachChild attaches a child to this node.
 void batch()
          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
protected  Transform getTransforms(Geometry geom)
           
protected  void setTransformRefresh()
          Indicate that the transform of this spatial has changed and that a refresh is required.
 
Methods inherited from class com.jme3.scene.BatchNode
doBatch, getMaterial, getOffsetIndex, read, setMaterial, setNeedsFullRebatch, updateGeometricState, updateSubBatch, write
 
Methods inherited from class com.jme3.scene.Node
attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, setLightListRefresh, setLodLevel, setModelBound, swapChildren, updateLogicalState, updateModelBound, updateWorldBound
 
Methods inherited from class com.jme3.scene.Spatial
addControl, addLight, breadthFirstTraversal, center, checkCulling, clone, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setParent, setQueueBucket, setShadowMode, setUserData, toString, updateWorldLightList, updateWorldTransforms, worldToLocal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleBatchNode

public SimpleBatchNode()

SimpleBatchNode

public SimpleBatchNode(java.lang.String name)
Method Detail

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

getTransforms

protected Transform getTransforms(Geometry geom)
Overrides:
getTransforms 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