Class LinearCurveMapper

Approximate spline curve by subdividing it into smaller linear line segments. Used to approximate length and mapping between uniform (u) and non-uniform (t) time along curve.

Hierarchy

Constructors

Properties

_alpha: number = 0.0
_cache: object
_closed: boolean = false
_onInvalidateCache: (() => void) = null

Type declaration

    • (): void
    • Returns void

_points: Vector[]
_subDivisions: number
_tension: number = 0.5

Accessors

Methods

  • Break curve into segments and return the curve length at each segment index. Used for mapping between t and u along the curve.

    Returns any[]

  • Get the curve function coefficients at the given segment index. The coefficients are calculated once per segment and put in cache until it is invalidated.

    Returns

    coefficients for the curve function at the given segment index

    Parameters

    • idx: number

      segment index

    Returns any

Generated using TypeDoc