You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jme3-core/src/main/java/com/jme3/scene/BatchNode.java
+33-94
Original file line number
Diff line number
Diff line change
@@ -31,14 +31,6 @@
31
31
*/
32
32
packagecom.jme3.scene;
33
33
34
-
importcom.jme3.export.*;
35
-
importcom.jme3.material.Material;
36
-
importcom.jme3.math.Matrix4f;
37
-
importcom.jme3.math.Vector3f;
38
-
importcom.jme3.scene.mesh.IndexBuffer;
39
-
importcom.jme3.util.SafeArrayList;
40
-
importcom.jme3.util.TempVars;
41
-
importjava.io.IOException;
42
34
importjava.nio.Buffer;
43
35
importjava.nio.FloatBuffer;
44
36
importjava.util.ArrayList;
@@ -48,13 +40,22 @@
48
40
importjava.util.logging.Level;
49
41
importjava.util.logging.Logger;
50
42
43
+
importcom.jme3.collision.Collidable;
44
+
importcom.jme3.collision.CollisionResults;
45
+
importcom.jme3.material.Material;
46
+
importcom.jme3.math.Matrix4f;
47
+
importcom.jme3.math.Vector3f;
48
+
importcom.jme3.scene.mesh.IndexBuffer;
49
+
importcom.jme3.util.SafeArrayList;
50
+
importcom.jme3.util.TempVars;
51
+
51
52
/**
52
53
* BatchNode holds geometries that are a batched version of all the geometries that are in its sub scenegraph.
53
54
* There is one geometry per different material in the sub tree.
54
55
* The geometries are directly attached to the node in the scene graph.
55
56
* 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
56
57
* (see todo more automagic for further enhancements)
57
-
* All the geometries that have been batched are set to {@link CullHint#Always} to not render them.
58
+
* All the geometries that have been batched are set to not be rendered - {@link CullHint} is left intact.
58
59
* The sub geometries can be transformed as usual, their transforms are used to update the mesh of the geometryBatch.
59
60
* Sub geoms can be removed but it may be slower than the normal spatial removing
60
61
* 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.
@@ -72,7 +73,7 @@ public class BatchNode extends GeometryGroupNode {
0 commit comments