Browse Source

- add JavaDoc to GeometryBatchFactory

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7213 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 14 years ago
parent
commit
0dacbb77e1
1 changed files with 12 additions and 0 deletions
  1. 12 0
      engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java

+ 12 - 0
engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java

@@ -207,6 +207,11 @@ public class GeometryBatchFactory {
     }
 
 
+    /**
+     * Batches a collection of Geometries so that all with the same material get combined.
+     * @param geometries The Geometries to combine
+     * @return A List of newly created Geometries, each with a  distinct material
+     */
     public static List<Geometry> makeBatches(Collection<Geometry> geometries){
         ArrayList<Geometry> retVal = new ArrayList<Geometry>();
         HashMap<Material, List<Geometry>> matToGeom = new HashMap<Material, List<Geometry>>();
@@ -248,6 +253,13 @@ public class GeometryBatchFactory {
         }
     }
 
+    /**
+     * Optimizes a scene by combining Geometry with the same material. If the
+     * given spatial has a parent it is removed from the parent and the newly
+     * generated scene is attached instead.
+     * @param scene The scene to optimize
+     * @return The newly created optimized scene
+     */
     public static Spatial optimize(Spatial scene){
         ArrayList<Geometry> geoms = new ArrayList<Geometry>();
         gatherGeoms(scene, geoms);