예제 #1
0
 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;
 }
예제 #2
0
 public bool HasVert(int3 t, int v)
 {
     return (t.At(0) == v || t.At(1) == v || t.At(2) == v);
 }
예제 #3
0
 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;
 }
예제 #4
0
 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???
 }
예제 #5
0
 public bool Above(IList<IndexedVector3> vertices, int3 t, IndexedVector3 p, float epsilon)
 {
     return Above(vertices, t, ref p, epsilon);
 }
예제 #6
0
 public HullTriangle(int a, int b, int c)
     : base(a, b, c)
 {
     n = new int3(-1, -1, -1);
     vmax = -1;
     rise = 0.0f;
 }