Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Facet

In N dimensions, a facet forms an N-1 "polygon" which can be combined into an N-dimensional shape such as a simplex, a convex hull, a triangulation, ... A facet consists out of ridges and vertices. Care has to be taken during construction that the vertices and ridges are in consistent order. The ridge's vertices must be a looping slice of (size-1) of the facet's vertices starting at its corresponding index, ie:

  • Every ridge at index I must start with the corresponding vertex at index I.
  • If this ridge at index I stores a vertex at index N, the facet's vertex index must be (N + I) % numVerts.

Hierarchy

  • Facet

Index

Properties

Properties

meta

meta: any

Any sort of meta-data, generally used internally.

plane

plane: Vector

The (hyper)plane containing the facet, represented as an N+1-dimensional vector (normal, offset)

ridges

ridges: Ridge[] = []

The set of ridges for the facet. Ridges are a dimension lower than the facet (ie: points for lines, edges for triangles, faces for tetrahedrons).

verts

verts: number[] = []

The vertices of the facet. Represented as indices into an external point array. While they're also contained in the ridges, it's useful for calculating barycentric coordinates for a facet.

Generated using TypeDoc