Function radialSortVectors3

  • Parameters

    • points: [number, number, number][]

      a list of 3D points

    • vector: [number, number, number] = ...

      a 3D vector describing the line's vector

    • origin: [number, number, number] = ...

      a point which this line passes through, by default this is set to be the origin.

    Returns number[]

    a list of indices that reference the input list.

    Description

    Radially sort a list of points in 3D space around a line. Imagine the line as a plane's normal, project the points down into the plane, normalized, and use them as input to the related method which radially sorts 2D normalized vectors, using our projected plane.