[committed] allow for tree count customitation in CollisionTreeManager

Hi,



in CollisionTreeManager the nr. of trees to use for collision detection is hardcoded to DEFAULT_MAX_ELEMENTS although maxElements exists as variable (private though). So, I propose adding setter and getter to allow tweaking this value:



Index: src/com/jme/bounding/CollisionTreeManager.java
===================================================================
--- src/com/jme/bounding/CollisionTreeManager.java      (revision 4854)
+++ src/com/jme/bounding/CollisionTreeManager.java      (working copy)
@@ -427,4 +427,19 @@
         this.maxTrisPerLeaf = maxTrisPerLeaf;
     }

+    /**
+     * Returns the maximum number of trees to maintain.
+     */
+    public int getMaxElements() {
+        return maxElements;
+    }
+
+    /**
+     * Sets the maximum number of trees to maintain.
+     * @param maxElements
+     *            the maximum number of trees to maintain.
+     */
+    public void setMaxElements(int maxElements) {
+        this.maxElements = maxElements;
+    }
 }

Seems ok to me.

As far as i see, no re-initialization needs to be done, after changing the maxElements.

committed with rev 4863