Line | |
---|
1 | namespace MIConvexHull
|
---|
2 | {
|
---|
3 | /// <summary>
|
---|
4 | /// A convex face representation containing adjacency information.
|
---|
5 | /// </summary>
|
---|
6 | public abstract class ConvexFace<TVertex, TFace>
|
---|
7 | where TVertex : IVertex
|
---|
8 | where TFace : ConvexFace<TVertex, TFace>
|
---|
9 | {
|
---|
10 | /// <summary>
|
---|
11 | /// Adjacency. Array of length "dimension".
|
---|
12 | /// If F = Adjacency[i] then the vertices shared with F are Vertices[j] where j != i.
|
---|
13 | /// In the context of triangulation, can be null (indicates the cell is at boundary).
|
---|
14 | /// </summary>
|
---|
15 | public TFace[] Adjacency { get; set; }
|
---|
16 |
|
---|
17 | /// <summary>
|
---|
18 | /// The vertices stored in clockwise order (for dimensions 2 - 4, higher dimensions the order is arbitrary).
|
---|
19 | /// Unless I accidentally switch some index somewhere in which case the order is CCW. Either way, it is consistent.
|
---|
20 | /// 3D Normal = (V[1] - V[0]) x (V[2] - V[1]).
|
---|
21 | /// </summary>
|
---|
22 | public TVertex[] Vertices { get; set; }
|
---|
23 |
|
---|
24 | /// <summary>
|
---|
25 | /// The normal vector of the face. Null if used in triangulation.
|
---|
26 | /// </summary>
|
---|
27 | public double[] Normal { get; set; }
|
---|
28 | }
|
---|
29 |
|
---|
30 | /// <summary>
|
---|
31 | /// A default convex face representation.
|
---|
32 | /// </summary>
|
---|
33 | /// <typeparam name="TVertex"></typeparam>
|
---|
34 | public class DefaultConvexFace<TVertex> : ConvexFace<TVertex, DefaultConvexFace<TVertex>>
|
---|
35 | where TVertex : IVertex
|
---|
36 | {
|
---|
37 | }
|
---|
38 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.