Interface ConstLinearCurve

All Superinterfaces:
AutoCloseable, Comparable<JoltPhysicsObject>, ConstJoltPhysicsObject
All Known Implementing Classes:
LinearCurve

public interface ConstLinearCurve extends ConstJoltPhysicsObject
Read-only access to a LinearCurve. (native type: const LinearCurve)
  • Method Details

    • countPoints

      int countPoints()
      Count the points in the curve. The curve is unaffected.
      Returns:
      the count (≥0)
    • getMaxX

      float getMaxX()
      Return the highest X value. The curve is unaffected.
      Returns:
      the highest X value
    • getMinX

      float getMinX()
      Return the lowest X value. The curve is unaffected.
      Returns:
      the lowest X value
    • getPointX

      float getPointX(int pointIndex)
      Return the X value of the specified point. The curve is unaffected.
      Parameters:
      pointIndex - the index of the point (≥0)
      Returns:
      the point's X value
    • getPointY

      float getPointY(int pointIndex)
      Return the Y value of the specified point. The curve is unaffected.
      Parameters:
      pointIndex - the index of the point (≥0)
      Returns:
      the point's Y value
    • getValue

      float getValue(float x)
      Return the Y value for the specified X. The curve is unaffected.
      Parameters:
      x - the input X value
      Returns:
      the interpolated Y value
    • saveBinaryState

      void saveBinaryState(StreamOut stream)
      Write the curve to the specified stream. The curve is unaffected.
      Parameters:
      stream - where to write objects (not null)