Package-level declarations

Types

Link copied to clipboard
class CatmullRom1(val p0: Double, val p1: Double, val p2: Double, val p3: Double, val alpha: Double = 0.5)

Creates a 1D Catmull-Rom spline curve.

Link copied to clipboard
class CatmullRom2(val p0: Vector2, val p1: Vector2, val p2: Vector2, val p3: Vector2, val alpha: Double = 0.5)

Creates a 2D Catmull-Rom spline curve.

Link copied to clipboard
class CatmullRom3(val p0: Vector3, val p1: Vector3, val p2: Vector3, val p3: Vector3, val alpha: Double = 0.5)

Creates a 3D Catmull-Rom spline curve.

Link copied to clipboard
class CatmullRomChain1(points: List<Double>, alpha: Double = 0.5, val loop: Boolean = false)

Calculates the 1D Catmull–Rom spline for a chain of points and returns the combined curve.

Link copied to clipboard
class CatmullRomChain2(points: List<Vector2>, alpha: Double = 0.5, val loop: Boolean = false)

Calculates the 2D Catmull–Rom spline for a chain of points and returns the combined curve.

Link copied to clipboard
class CatmullRomChain3(points: List<Vector3>, alpha: Double = 0.5, val loop: Boolean = false)

Calculates the 3D Catmull–Rom spline for a chain of points and returns the combined curve.

Functions

Link copied to clipboard
fun List<Vector2>.catmullRom(alpha: Double = 0.5, closed: Boolean): CatmullRomChain2
fun List<Vector3>.catmullRom(alpha: Double = 0.5, closed: Boolean): CatmullRomChain3
Link copied to clipboard
fun CatmullRomChain2.toContour(): ShapeContour

Converts chain to a ShapeContour.

Link copied to clipboard

Converts a 3D Catmull-Rom spline chain into a Path3D representation.

Link copied to clipboard
fun CatmullRom2.toSegment(): Segment2D

Converts spline to a Segment.

fun CatmullRom3.toSegment(): Segment3D

Converts the current 3D Catmull-Rom spline segment into a cubic Bézier curve representation.