Class QuadraticBezierCurve2

An extensible curve object which contains methods for interpolation

Hierarchy

Constructors

Properties

arcLengthDivisions: number

This value determines the amount of divisions when calculating the cumulative segment lengths of a curve via .getLengths. To ensure precision when using methods like .getSpacedPoints, it is recommended to increase .arcLengthDivisions if the curve is very large.

cacheArcLengths: number[]
needsUpdate: boolean

Methods

  • Parameters

    • segments: number
    • closed: boolean

    Returns {
        binormals: Vector3[];
        normals: Vector3[];
        tangents: Vector3[];
    }

  • Get total curve arc length

    Returns number

  • Get list of cumulative segment lengths

    Parameters

    • Optional divisions: number

    Returns number[]

  • Virtual base class method to overwrite and implement in subclasses

    • t [0 .. 1] Returns a vector for point t of the curve where t is between 0 and 1

    Parameters

    • t: number
    • Optional optionalTarget: Vector2

    Returns Vector2

  • Get point at relative position in curve according to arc length Returns a vector for point at relative position in curve according to arc length

    Parameters

    • u: number

      [0 .. 1]

    • Optional optionalTarget: Vector2

    Returns Vector2

  • Get sequence of points using getPoint( t )

    Parameters

    • Optional divisions: number

    Returns Vector2[]

  • Parameters

    • divisions: number

    Returns number

  • Get sequence of equi-spaced points using getPointAt( u )

    Parameters

    • divisions: number

    Returns any[]

  • Returns a unit vector tangent at t. If the subclassed curve do not implement its tangent derivation, 2 points a small delta apart will be used to find its gradient which seems to give a reasonable approximation getTangent(t: number, optionalTarget?: T): T;

    Parameters

    Returns Vector2

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

    Parameters

    Returns Vector2

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

    Parameters

    • u: number
    • Optional distance: number

    Returns number

  • Update the cumlative segment distance cache

    Returns void

Generated using TypeDoc