BezierSegment

Functions

Link copied to clipboard
open fun adaptivePositions(distanceTolerance: Double = 0.5): List<T>

Recursively subdivides Segment2D to approximate Bézier curve.

Link copied to clipboard
open fun adaptivePositionsWithT(distanceTolerance: Double = 0.5): List<Pair<T, Double>>
Link copied to clipboard
abstract fun derivative(t: Double): T
Link copied to clipboard
open fun direction(): T

Returns the direction T of between the Segment2D anchor points.

open fun direction(t: Double): T
Link copied to clipboard
open fun equidistantPositions(pointCount: Int, distanceTolerance: Double = 0.5): List<T>

Samples specified amount of points on the Segment2D.

Link copied to clipboard
open fun equidistantPositionsWithT(pointCount: Int, distanceTolerance: Double = 0.5): List<Pair<T, Double>>
Link copied to clipboard
open fun pointAtLength(length: Double, distanceTolerance: Double): T

Calculates the point at a given distance along this Segment2D.

Link copied to clipboard
abstract fun position(ut: Double): T

Returns a point on the segment.

Link copied to clipboard
abstract fun split(t: Double): Array<out BezierSegment<T>>

Splits the path into one or two parts, depending on if the cut was successful.

Link copied to clipboard
open fun sub(t0: Double, t1: Double): BezierSegment<T>

Samples a new Segment2D from the current Segment2D starting at t0 and ending at t1.

Link copied to clipboard
abstract fun tForLength(length: Double): Double

Estimate t value for a given length

Properties

Link copied to clipboard
abstract val control: List<T>
Link copied to clipboard
@Transient
abstract val cubic: BezierSegment<T>
Link copied to clipboard
abstract val end: T
Link copied to clipboard
@Transient
abstract val length: Double
Link copied to clipboard
@Transient
open val linear: Boolean

Indicates whether the Segment2D is linear.

Link copied to clipboard
@Transient
abstract val reverse: BezierSegment<T>
Link copied to clipboard
abstract val start: T
Link copied to clipboard
@Transient
open val type: SegmentType

Returns the type of the segment.