Esempio n. 1
0
  /**
   * ************************************************************************* The method which
   * comparing two triangles, if the triangles have same coordinates of vertexes
   *
   * @param T - triangle to test
   * @return boolean true - the triangles are same false - the triangles aren't same
   */
  public boolean compare(TriangleDT T) {
    if ((T.A.compare(A) || T.A.compare(B) || T.A.compare(C))
        && (T.B.compare(A) || T.B.compare(B) || T.B.compare(C))
        && (T.C.compare(A) || T.C.compare(B) || T.C.compare(C))) {

      return true;
    }

    return false;
  }
Esempio n. 2
0
 /**
  * ************************************************************************* The method which
  * testing two triangles, if the triangles have one same point
  *
  * @param T - triangle to test
  * @return boolean true - the triangles have one same point false - the triangles haven't one same
  *     point
  */
 protected boolean containsOneSamePointWith(TriangleDT T) {
   if (T.A.compare(A) || T.A.compare(B) || T.A.compare(C)) return true;
   if (T.B.compare(A) || T.B.compare(B) || T.B.compare(C)) return true;
   if (T.C.compare(A) || T.C.compare(B) || T.C.compare(C)) return true;
   else return false;
 }