Added a way to clear all waypoitns at once on a motion path

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8365 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 13 years ago
parent 4cde46bee5
commit 7c4f085174
  1. 4
      engine/src/core/com/jme3/cinematic/MotionPath.java
  2. 5
      engine/src/core/com/jme3/math/Spline.java

@ -337,6 +337,10 @@ public class MotionPath implements Savable {
} }
} }
public void clearWayPoints(){
spline.clearControlPoints();
}
/** /**
* Sets the path to be a cycle * Sets the path to be a cycle
* @param cycle * @param cycle

@ -178,6 +178,11 @@ public class Spline implements Savable {
this.computeTotalLentgh(); this.computeTotalLentgh();
} }
} }
public void clearControlPoints(){
controlPoints.clear();
totalLength = 0;
}
/** /**
* This method computes the total length of the curve. * This method computes the total length of the curve.

Loading…
Cancel
Save