From ff5db41a0e7443c9972e7edea911493ff5694cd5 Mon Sep 17 00:00:00 2001 From: "Kae..pl" Date: Mon, 21 Mar 2011 11:45:00 +0000 Subject: [PATCH] A method that returns the length added to curve. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7063 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/scene/shape/Curve.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engine/src/core/com/jme3/scene/shape/Curve.java b/engine/src/core/com/jme3/scene/shape/Curve.java index d7d0a4745..56e57356d 100644 --- a/engine/src/core/com/jme3/scene/shape/Curve.java +++ b/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(); + } }