Calculates the barycentric coordinates for a given point and a Facet. Every element of the coordinate is the weight for the facet's vertex at the corresponding index.
The position to calculate the barycentric coords for.
The Facet relative to which the coords are calculated.
The points array indexed by Facet.
An optional target to store the results. For dimension N, must be of length N+1.
Creates an N-simplex from N+1 points. The dimension of the points are used to define the dimension of the simplex.
An array of points. Only the first N+1 points are used.
An optional array of indices into points to define which points in the set are used.
QuickHull implements the algorithm of the same name, based on the original paper by Barber, Dobkin and Huhdanpaa. We're not interested in 0- or 1-dimensional cases (the latter can simply be the extent of the point values). QuickHull returns a set of indices into the original point list so we can map it to a different original ata set (fe: points may be a mapping for position vectors on some scene graph object).
Performs the visibility walk algorithm to find the Facet containing the given position. This should only be used on Delaunay triangulations, as other triangulations are not guaranteed to resolve to a solution.
The position to search for.
The facets to search
The points indexed by the facets.
An optional facet to start the search. If none is provided, an initial search estimate is made, but this is not guaranteed to be a performance improvement.
Performs the visibility walk algorithm to find the Facet containing the given position. This should only be used on Delaunay triangulations, as other triangulations are not guaranteed to resolve to a solution.
The position to search for.
The facets to search
The points indexed by the facets.
If true, searches the facets to find an initial match.
Generated using TypeDoc
Vector is the representation for any N-dimensional vector. This can be either an array of numbers, or a Float32Array.