namespace MIConvexHull { /// /// A convex face representation containing adjacency information. /// public abstract class ConvexFace where TVertex : IVertex where TFace : ConvexFace { /// /// Adjacency. Array of length "dimension". /// If F = Adjacency[i] then the vertices shared with F are Vertices[j] where j != i. /// In the context of triangulation, can be null (indicates the cell is at boundary). /// public TFace[] Adjacency { get; set; } /// /// The vertices stored in clockwise order (for dimensions 2 - 4, higher dimensions the order is arbitrary). /// Unless I accidentally switch some index somewhere in which case the order is CCW. Either way, it is consistent. /// 3D Normal = (V[1] - V[0]) x (V[2] - V[1]). /// public TVertex[] Vertices { get; set; } /// /// The normal vector of the face. Null if used in triangulation. /// public double[] Normal { get; set; } } /// /// A default convex face representation. /// /// public class DefaultConvexFace : ConvexFace> where TVertex : IVertex { } }