Skip to main content

QuadBezierSegment

class QuadBezierSegment extends PolynomialSegment

A spline segment representing a quadratic Bézier curve.

Constructors

constructor

public override new QuadBezierSegmentp0: Vector2p1: Vector2p2: Vector2: QuadBezierSegment

Parameters

Overwrites PolynomialSegment.constructor

Properties

p0

readonly public p0: Vector2

p1

readonly public p1: Vector2

p2

readonly public p2: Vector2

Accessors

arcLength

public get arcLength(): number
Inherited from PolynomialSegment.arcLength

points

public get override points(): Vector2[]
Overwrites PolynomialSegment.points

Methods

draw

public drawcontext: CanvasRenderingContext2DPath2Dstart: number = 0end: number = 1move: boolean = true: CurvePointCurvePoint

Parameters

Inherited from PolynomialSegment.draw

eval

public evalt: number: CurvePoint

Evaluate the polynomial at the given t value.

Parameters

  • t: number

    The t value at which to evaluate the curve.

Inherited from PolynomialSegment.eval

getBBox

public getBBox(): BBox
Inherited from PolynomialSegment.getBBox

getPoint

public getPointdistance: number: CurvePoint

Parameters

Inherited from PolynomialSegment.getPoint

split

public override splitt: number: PolynomialSegmentPolynomialSegment

Parameters

  • t: number
Overwrites PolynomialSegment.split

tangent

public tangentt: number: Vector2

Return the tangent of the point that sits at the provided t value on the curve.

Parameters

  • t: number

    The t value at which to evaluate the curve.

Inherited from PolynomialSegment.tangent

transformPoints

public transformPointsmatrix: DOMMatrix: Vector2[]

Parameters

Inherited from PolynomialSegment.transformPoints