if (!triangle.isCorner(point)) { System.err .println("findConnectedVertices: Could not find connected vertices since the first found triangle doesn't"
/** * determinates if this triangle contains the point p. * * @param p * the query point * @return true iff p is not null and is inside this triangle (Note: on * boundary is considered outside!!). */ public boolean containsBoundaryIsOutside(Point p) { boolean ans = false; if (this.halfplane || p == null) return false; if (isCorner(p)) { return true; } int a12 = p.pointLineTest(a, b); int a23 = p.pointLineTest(b, c); int a31 = p.pointLineTest(c, a); if ((a12 == Point.LEFT && a23 == Point.LEFT && a31 == Point.LEFT) || (a12 == Point.RIGHT && a23 == Point.RIGHT && a31 == Point.RIGHT)) ans = true; return ans; }
/** * determinates if this triangle contains the point p. * * @param p * the query point * @return true iff p is not null and is inside this triangle (Note: on * boundary is considered inside!!). */ public boolean contains(Point p) { boolean ans = false; if (this.halfplane || p == null) return false; if (isCorner(p)) { return true; } int a12 = p.pointLineTest(a, b); int a23 = p.pointLineTest(b, c); int a31 = p.pointLineTest(c, a); if ((a12 == Point.LEFT && a23 == Point.LEFT && a31 == Point.LEFT) || (a12 == Point.RIGHT && a23 == Point.RIGHT && a31 == Point.RIGHT) || (a12 == Point.ONSEGMENT || a23 == Point.ONSEGMENT || a31 == Point.ONSEGMENT)) ans = true; return ans; }