CatmullRomChain3

class CatmullRomChain3 @JvmOverloads constructor(    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.

For more details, see CatmullRom3.

Parameters

points

The List of 3D points where CatmullRom3 is applied in groups of 4.

alpha

The tension of the curve. Use 0.0 for the uniform spline, 0.5 for the centripetal spline, 1.0 for the chordal spline.

loop

Whether or not to connect the first and last point so it forms a closed shape.

Constructors

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

Functions

Link copied to clipboard
fun position(rt: Double): Vector3
Link copied to clipboard
fun positions(steps: Int = segments.size * 4): List<Vector3>

Properties

Link copied to clipboard
val loop: Boolean = false
Link copied to clipboard
val segments: List<CatmullRom3>

Sources

Link copied to clipboard