CubicBezier2

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val p0: Vec2
Link copied to clipboard
val p1: Vec2
Link copied to clipboard
val p2: Vec2
Link copied to clipboard
val p3: Vec2

Functions

Link copied to clipboard
Link copied to clipboard
open override fun bounds(): Box2
Link copied to clipboard
open override fun direction(t: Double): Vec2
Link copied to clipboard
open override fun end(): Vec2
Link copied to clipboard
open override fun endpoints(start: Vec2, end: Vec2): Bezier2.CubicBezier2
Link copied to clipboard
open override fun inflections(): DoubleArray
Link copied to clipboard
Link copied to clipboard
open override fun isFlat(epsilon: Double): Boolean
Link copied to clipboard
open override fun length(): Double
Link copied to clipboard
open override fun nearestPoint(p: Vec2): Double

This quintic solver is adapted from https://github.com/Chlumsky/msdfgen, which is available under the MIT license.

Link copied to clipboard
open override fun position(t: Double): Vec2
Link copied to clipboard
open fun range(interval: Interval): Curve2
open fun range(tMin: Double, tMax: Double): Curve2
Link copied to clipboard
open override fun reverse(): Bezier2.CubicBezier2
Link copied to clipboard
open override fun signedArea(): Double

Given a ring of curves, the sum of area() will be the area enclosed by that ring. For clockwise rings, the sum will be negative, for counter-clockwise rings it will be positive.

Link copied to clipboard
open override fun split(t: Double): Array<Curve2>
open fun split(unsafeTs: DoubleArray): Array<Curve2>
Link copied to clipboard
open override fun start(): Vec2
Link copied to clipboard
open override fun subdivide(error: Double): Array<Vec2>
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun transform(m: Matrix3): Curve2