Class ClampedCubicSpline

java.lang.Object
com.petrolpark.util.ClampedCubicSpline
Direct Known Subclasses:
TubeSpline

public class ClampedCubicSpline extends Object
  • Field Details

    • startTangent

      protected net.minecraft.world.phys.Vec3 startTangent
    • endTangent

      protected net.minecraft.world.phys.Vec3 endTangent
    • controlPoints

      protected List<net.minecraft.world.phys.Vec3> controlPoints
    • segmentLength

      public final double segmentLength
    • totalLength

      protected double totalLength
    • points

      protected ArrayList<net.minecraft.world.phys.Vec3> points
    • tangents

      protected ArrayList<net.minecraft.world.phys.Vec3> tangents
    • occupiedVolume

      protected net.minecraft.world.phys.AABB occupiedVolume
  • Constructor Details

    • ClampedCubicSpline

      public ClampedCubicSpline(List<net.minecraft.world.phys.Vec3> controlPoints, net.minecraft.world.phys.Vec3 startDir, net.minecraft.world.phys.Vec3 endDir, double segmentLength)
    • ClampedCubicSpline

      protected ClampedCubicSpline(net.minecraft.world.phys.Vec3 start, net.minecraft.world.phys.Vec3 end, net.minecraft.world.phys.Vec3 startDir, net.minecraft.world.phys.Vec3 endDir, double segmentLength)
  • Method Details

    • getStartTangent

      public net.minecraft.world.phys.Vec3 getStartTangent()
    • getEndTangent

      public net.minecraft.world.phys.Vec3 getEndTangent()
    • getControlPoints

      public List<net.minecraft.world.phys.Vec3> getControlPoints()
    • getPoints

      public List<net.minecraft.world.phys.Vec3> getPoints()
    • getTangents

      public List<net.minecraft.world.phys.Vec3> getTangents()
    • getLength

      public double getLength()
    • getOccupiedVolume

      public net.minecraft.world.phys.AABB getOccupiedVolume()
    • addControlPoint

      public void addControlPoint(net.minecraft.world.phys.Vec3 controlPoint)
    • addInterpolatedControlPoint

      public void addInterpolatedControlPoint(int index)
    • removeControlPoint

      public void removeControlPoint(int index)
    • moveControlPoint

      public boolean moveControlPoint(int controlPointIndex, net.minecraft.world.phys.Vec3 newLocation)
    • recalculate

      public void recalculate()
    • forEachSegment

      protected void forEachSegment(int index, net.minecraft.world.phys.Vec3 point, net.minecraft.world.phys.Vec3 tangent)