Lines Matching refs:batch

57  * 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
62 * Sub geoms can be added after the batch() method has been called but won't be batched and will be rendered as normal geometries.
63 * To integrate them in the batch you have to call the batch() method again on the batchNode.
66 * TODO more automagic (batch when needed in the updateLigicalState)
120 for (Batch batch : batches.values()) {
121 if (batch.needMeshUpdate) {
122 batch.geometry.getMesh().updateBound();
123 batch.geometry.updateWorldBound();
124 batch.needMeshUpdate = false;
144 Batch batch = batches.get(bg.getMaterial());
145 if (batch != null) {
146 Mesh mesh = batch.geometry.getMesh();
166 batch.needMeshUpdate = true;
174 public void batch() {
176 //we set the batch geometries to ignore transforms to avoid transforms of parent nodes to be applied twice
177 for (Batch batch : batches.values()) {
178 batch.geometry.setIgnoreTransform(true);
189 for (Batch batch : batches.values()) {
190 batch.geometry.removeFromParent();
204 Batch batch = new Batch();
206 batch.geometry = new Geometry(name + "-batch" + batches.size());
207 batch.geometry.setMaterial(material);
208 this.attachChild(batch.geometry);
211 batch.geometry.setMesh(m);
212 batch.geometry.getMesh().updateCounts();
213 batch.geometry.getMesh().updateBound();
214 batches.put(material, batch);
260 for (Batch batch : batches.values()) {
261 if (batch.geometry == s) {
270 * use setMaterial(Material material,int batchIndex) to set a material to a specific batch
276 // for (Batch batch : batches.values()) {
277 // batch.geometry.setMaterial(material);
283 * Returns the material that is used for the first batch of this BatchNode
285 * use getMaterial(Material material,int batchIndex) to get a material from a specific batch
287 * @return the material that is used for the first batch of this BatchNode
300 // * Sets the material to the a specific batch of this BatchNode
313 // * Returns the material that is used for the first batch of this BatchNode
315 // * use getMaterial(Material material,int batchIndex) to get a material from a specific batch
317 // * @return the material that is used for the first batch of this BatchNode
457 geom.batch(this, globalVertIndex);