Class Curve

java.lang.Object
com.jme3.scene.Mesh
com.jme3.scene.shape.Curve
All Implemented Interfaces:
Savable, JmeCloneable, Cloneable

public class Curve extends Mesh
A Curve is a visual, line-based representation of a Spline. The underlying Spline will be sampled N times, where N is the number of segments as specified in the constructor. Each segment will represent one line in the generated mesh.
  • Constructor Details

    • Curve

      protected Curve()
      Serialization only. Do not use.
    • Curve

      public Curve(Vector3f[] controlPoints, int nbSubSegments)
      Create a curve mesh. Use a CatmullRom spline model that does not cycle.
      Parameters:
      controlPoints - the control points to use to create this curve
      nbSubSegments - the number of subsegments between the control points
    • Curve

      public Curve(Spline spline, int nbSubSegments)
      Create a curve mesh from a Spline
      Parameters:
      spline - the spline to use
      nbSubSegments - the number of subsegments between the control points
  • Method Details

    • getLength

      public float getLength()
      This method returns the length of the curve.
      Returns:
      the length of the curve