Browse Source

A method that returns the length added to curve.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7063 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Kae..pl 14 years ago
parent
commit
ff5db41a0e
1 changed files with 8 additions and 0 deletions
  1. 8 0
      engine/src/core/com/jme3/scene/shape/Curve.java

+ 8 - 0
engine/src/core/com/jme3/scene/shape/Curve.java

@@ -181,4 +181,12 @@ public class Curve extends Mesh {
         updateBound();
         updateCounts();
     }
+    
+    /**
+     * This method returns the length of the curve.
+     * @return the length of the curve
+     */
+    public float getLength() {
+    	return spline.getTotalLength();
+    }
 }