From 0dacbb77e1be58ab92b9cb38417d6f515b37ba3a Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Thu, 7 Apr 2011 11:48:28 +0000 Subject: [PATCH] - add JavaDoc to GeometryBatchFactory git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7213 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../jme3tools/optimize/GeometryBatchFactory.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java b/engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java index efbba910c..33203c493 100644 --- a/engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java +++ b/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 makeBatches(Collection geometries){ ArrayList retVal = new ArrayList(); HashMap> matToGeom = new HashMap>(); @@ -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 geoms = new ArrayList(); gatherGeoms(scene, geoms);