Class AbstractCurveMapperAbstract

The curve mapper's main responsibility is to map between normalized curve position (u) to curve segments and segment position (t). Since it requires access to control points and curve parameters, it also keeps this data along with an internal cache. For this reason, the common functionality has been but into this abstract class definition, so that the mapping specific implementation can be held at a minimum by extending this class.

Hierarchy

Implements

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

  • 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

  • Returns the curve length in point coordinates from the global curve position u, where u=1 is the full length of the curve.

    Parameters

    • u: number

      normalized position on curve (0..1)

    Returns number

Generated using TypeDoc