Package com.petrolpark.util
Class ClampedCubicSpline
java.lang.Object
com.petrolpark.util.ClampedCubicSpline
- Direct Known Subclasses:
TubeSpline
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<net.minecraft.world.phys.Vec3>protected net.minecraft.world.phys.Vec3protected net.minecraft.world.phys.AABBprotected ArrayList<net.minecraft.world.phys.Vec3>final doubleprotected net.minecraft.world.phys.Vec3protected ArrayList<net.minecraft.world.phys.Vec3>protected double -
Constructor Summary
ConstructorsModifierConstructorDescriptionClampedCubicSpline(List<net.minecraft.world.phys.Vec3> controlPoints, net.minecraft.world.phys.Vec3 startDir, net.minecraft.world.phys.Vec3 endDir, double segmentLength) protectedClampedCubicSpline(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 Summary
Modifier and TypeMethodDescriptionvoidaddControlPoint(net.minecraft.world.phys.Vec3 controlPoint) voidaddInterpolatedControlPoint(int index) protected voidforEachSegment(int index, net.minecraft.world.phys.Vec3 point, net.minecraft.world.phys.Vec3 tangent) List<net.minecraft.world.phys.Vec3>net.minecraft.world.phys.Vec3doublenet.minecraft.world.phys.AABBList<net.minecraft.world.phys.Vec3>net.minecraft.world.phys.Vec3List<net.minecraft.world.phys.Vec3>booleanmoveControlPoint(int controlPointIndex, net.minecraft.world.phys.Vec3 newLocation) voidvoidremoveControlPoint(int index)
-
Field Details
-
startTangent
protected net.minecraft.world.phys.Vec3 startTangent -
endTangent
protected net.minecraft.world.phys.Vec3 endTangent -
controlPoints
-
segmentLength
public final double segmentLength -
totalLength
protected double totalLength -
points
-
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
-
getPoints
-
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)
-