Class LineCurve

An extensible curve object which contains methods for interpolation class Curve<T extends Vector>

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(v1: Vector2, v2: Vector2): LineCurve

Parameters

Returns

LineCurve

Properties

public needsUpdate: boolean

public v1: Vector2

public v2: Vector2

Methods

public getLength(): number

Get total curve arc length

Returns

number

public getLengths(divisions?: number): Array<number>

Get list of cumulative segment lengths

Parameters

  • divisions?: number optional

Returns

Array<number>

public getPoint(t: number): Vector2

Parameters

  • t: number

Returns

Vector2

public getPointAt(u: number): Vector2

Parameters

  • u: number

Returns

Vector2

public getPoints(divisions?: number): Vector[]

Get sequence of points using getPoint( t ) getPoints(divisions?: number): T[];

Parameters

  • divisions?: number optional

Returns

Vector[]

public getSpacedPoints(divisions?: number): Vector[]

Get sequence of equi-spaced points using getPointAt( u ) getSpacedPoints(divisions?: number): T[];

Parameters

  • divisions?: number optional

Returns

Vector[]

public getTangent(t: number): Vector2

Parameters

  • t: number

Returns

Vector2

public getTangentAt(u: number): Vector

Returns tangent at equidistance point u on the curve getTangentAt(u: number): T;

Parameters

  • u: number

Returns

Vector

public getUtoTmapping(u: number, distance: number): number

Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equi distance

Parameters

  • u: number
  • distance: number

Returns

number

public updateArcLengths()

Update the cumlative segment distance cache