Exemplo n.º 1
0
 /**
  * ************************************************************************* The method which
  * testing two triangles, if the triangles have two same points
  *
  * @param P1 - point for testing
  * @param P2 - point for testing
  * @return boolean true - the triangles have two same point false - the triangles haven't two same
  *     point
  */
 public boolean containsTwoPoints(PointDT P1, PointDT P2) {
   if ((A.compare(P1) || B.compare(P1) || C.compare(P1))
       && (A.compare(P2) || B.compare(P2) || C.compare(P2))) return true;
   return false;
 }
Exemplo n.º 2
0
 /**
  * **************************************************************** The method which compare
  * points
  *
  * @param P - points for comparing
  * @return index A,B,C which point is same or N if point P not exist in triangle
  */
 public char compareReturnIndex(PointDT P) {
   if (P.compare(A)) return 'A';
   if (P.compare(B)) return 'B';
   if (P.compare(C)) return 'C';
   return 'N';
 }
Exemplo n.º 3
0
 /**
  * ************************************************************************* The method which
  * testing, if the triangle contains the point
  *
  * @param P - point which will be tested
  * @return boolean true - the triangle contains the point false - the triangle doesn't contains
  *     point
  */
 public boolean containsPointAsVertex(PointDT P) {
   if (A.compare(P) || B.compare(P) || C.compare(P)) return true;
   else return false;
 }