CatmullRom3

class CatmullRom3 @JvmOverloads constructor(    val p0: Vector3,     val p1: Vector3,     val p2: Vector3,     val p3: Vector3,     val alpha: Double = 0.5)

Creates a 3D Catmull-Rom spline curve.

Can be represented as a segment drawn between p1 and p2, while p0 and p3 are used as control points.

Under some circumstances alpha can have no perceptible effect, for example, when creating closed shapes with the vertices forming a regular 2D polygon (even on a 3D plane).

Parameters

p0

The first control point.

p1

The starting anchor point.

p2

The ending anchor point.

p3

The second control point.

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.

Constructors

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

Functions

Link copied to clipboard
fun position(rt: Double): Vector3

Properties

Link copied to clipboard
val alpha: Double = 0.5
Link copied to clipboard
val p0: Vector3
Link copied to clipboard
val p1: Vector3
Link copied to clipboard
val p2: Vector3
Link copied to clipboard
val p3: Vector3
Link copied to clipboard
val t0: Double = 0.0

Value of t for p0.

Link copied to clipboard
val t1: Double

Value of t for p1.

Link copied to clipboard
val t2: Double

Value of t for p2.

Link copied to clipboard
val t3: Double

Value of t for p3.

Sources

Link copied to clipboard