Package com.jme3.scene
Class SimpleBatchNode
java.lang.Object
com.jme3.scene.Spatial
com.jme3.scene.Node
com.jme3.scene.GeometryGroupNode
com.jme3.scene.BatchNode
com.jme3.scene.SimpleBatchNode
- All Implemented Interfaces:
HasLocalTransform,CloneableSmartAsset,Collidable,Savable,JmeCloneable,Cloneable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.scene.BatchNode
BatchNode.BatchNested classes/interfaces inherited from class com.jme3.scene.Spatial
Spatial.BatchHint, Spatial.CullHint, Spatial.DFSMode -
Field Summary
Fields inherited from class com.jme3.scene.BatchNode
batches, batchesByGeomFields inherited from class com.jme3.scene.Spatial
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localOverrides, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_CHILD_LIGHTLIST, RF_LIGHTLIST, RF_MATPARAM_OVERRIDE, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldOverrides, worldTransform -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintattachChild(Spatial child) attachChildattaches a child to this node.voidbatch()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 callprotected Matrix4fprotected voidIndicate that the transform of this spatial has changed and that a refresh is required.Methods inherited from class com.jme3.scene.BatchNode
clone, cloneFields, collideWith, detachChildAt, doBatch, getMaterial, isBatch, onGeometryUnassociated, onMaterialChange, onMeshChange, onTransformChange, setMaterial, setNeedsFullRebatch, updateSubBatchMethods inherited from class com.jme3.scene.GeometryGroupNode
getGeometryStartIndex, setGeometryStartIndexMethods inherited from class com.jme3.scene.Node
attachChildAt, breadthFirstTraversal, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, oldDeepClone, read, setLightListRefresh, setLodLevel, setMatParamOverrideRefresh, setModelBound, setParent, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, updateWorldBound, writeMethods inherited from class com.jme3.scene.Spatial
addControl, addControlAt, addLight, addMatParamOverride, breadthFirstTraversal, center, checkCulling, clearMatParamOverrides, clone, depthFirstTraversal, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalMatParamOverrides, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldMatParamOverrides, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, jmeClone, localToWorld, lookAt, matches, move, move, oldClone, removeControl, removeControl, removeFromParent, removeLight, removeMatParamOverride, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setRequiresUpdates, setShadowMode, setUserData, toString, updateMatParamOverrides, updateWorldLightList, updateWorldTransforms, worldToLocal
-
Constructor Details
-
SimpleBatchNode
public SimpleBatchNode() -
SimpleBatchNode
-
-
Method Details
-
attachChild
Description copied from class:NodeattachChildattaches 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:
attachChildin classNode- 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:SpatialIndicate that the transform of this spatial has changed and that a refresh is required.- Overrides:
setTransformRefreshin classNode
-
getTransformMatrix
- Overrides:
getTransformMatrixin classBatchNode
-
batch
public void batch()Description copied from class:BatchNodeBatch 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
-