public int ShareEdge(int3 a, int3 b) { int i; for (i = 0; i < 3; i++) { int i1 = (i + 1) % 3; if (HasEdge(a, b.At(i1), b.At(i))) return 1; } return 0; }
public bool HasVert(int3 t, int v) { return (t.At(0) == v || t.At(1) == v || t.At(2) == v); }
public bool HasEdge(int3 t, int a, int b) { for (int i = 0; i < 3; i++) { int i1 = (i + 1) % 3; if (t.At(i) == a && t.At(i1) == b) return true; } return false; }
public bool Above(IList<IndexedVector3> vertices, int3 t, ref IndexedVector3 p, float epsilon) { IndexedVector3 n = HullLibrary.TriNormal(vertices[t.At(0)], vertices[t.At(1)], vertices[t.At(2)]); return (IndexedVector3.Dot(n, p - vertices[t.At(0)]) > epsilon); // EPSILON??? }
public bool Above(IList<IndexedVector3> vertices, int3 t, IndexedVector3 p, float epsilon) { return Above(vertices, t, ref p, epsilon); }
public HullTriangle(int a, int b, int c) : base(a, b, c) { n = new int3(-1, -1, -1); vmax = -1; rise = 0.0f; }