Checks if the projection of a point on the triangle's plane is inside the triangle.

@param point is the the point
@return <code>true</code> if the projection of the point is in the triangle, otherwise <code>false</code>.
180495
@Pure
	public boolean containsProjectionOf(Point3f point) {
		return containsProjectionOf(point.getX(), point.getY(), point.getZ());
	}
902675
public static boolean isSimple(Geometry geometry) {
		if (isEmpty(geometry)) {
			return true;
		}
		if (geometry.getGeometries() != null) {
			for (Geometry child : geometry.getGeometries()) {
				if (!isSimple(child)) {
					return false;
				}
				if (Geometry.MULTI_LINE_STRING.equals(geometry.getGeometryType())) {
					for (Geometry child2 : geometry.getGeometries()) {
						if (child != child2 && intersects(child, child2)) {
							return false;
						}
					}
				}
			}
		}
		if (geometry.getCoordinates() != null) {
			List<Coordinate> coords1 = new ArrayList<Coordinate>();
			List<Coordinate> coords2 = new ArrayList<Coordinate>();
			getAllCoordinates(geometry, coords1);
			getAllCoordinates(geometry, coords2);

			// Search for any intersection:
			if (coords1.size() > 1 && coords2.size() > 1) {
				for (int i = 0; i < coords2.size() - 1; i++) {
					for (int j = 0; j < coords1.size() - 1; j++) {
						if ((i != j)
								&& MathService.intersectsLineSegment(coords2.get(i), coords2.get(i + 1),
										coords1.get(j), coords1.get(j + 1))) {
							return false;
						}
					}
				}
			}
		}
		return true;
	}
695171
static boolean pointInPolygon(float[] pt, float[] verts, int nverts) {
        // TODO: Replace pnpoly with triArea2D tests?
        int i, j;
        boolean c = false;
        for (i = 0, j = nverts - 1; i < nverts; j = i++) {
            int vi = i * 3;
            int vj = j * 3;
            if (((verts[vi + 2] > pt[2]) != (verts[vj + 2] > pt[2])) && (pt[0] < (verts[vj + 0] - verts[vi + 0])
                    * (pt[2] - verts[vi + 2]) / (verts[vj + 2] - verts[vi + 2]) + verts[vi + 0])) {
                c = !c;
            }
        }
        return c;
    }
1008366
public function inside(QtiPoint $point)
    {
        if ($this->getShape() === QtiShape::DEF) {
            return true;
        } elseif ($this->getShape() === QtiShape::RECT) {
            return $point->getX() >= $this[0] && $point->getX() <= $this[2] && $point->getY() >= $this[1] && $point->getY() <= $this[3];
        } elseif ($this->getShape() === QtiShape::CIRCLE) {
            return pow($point->getX() - $this[0], 2) + pow($point->getY() - $this[1], 2) < pow($this[2], 2);
        } else {
            // we consider it is a polygon.
            // - Transform coordinates in vertices.
            // -- Use of the "point in polygon" algorithm.
            $vertices = array();
            for ($i = 0; $i < count($this); $i++) {
                $vertex = array();
                $vertex[] = $this[$i]; //x
                $i++;
                $vertex[] = $this[$i]; //y

                $vertices[] = $vertex;
            }

            $intersects = 0;
            for ($i = 1; $i < count($vertices); $i++) {
                $vertex1 = $vertices[$i -1];
                $vertex2 = $vertices[$i];

                if ($vertex1[1] === $vertex2[1] && $vertex1[1] === $point->getY() && $point->getX() > min($vertex1[0], $vertex2[0]) && $point->getX() < max($vertex1[0], $vertex2[0])) {
                    // we are on a boundary.
                    return true;
                }

                if ($point->getY() > min($vertex1[1], $vertex2[1]) && $point->getY() <= max($vertex1[1], $vertex2[1]) && $point->getX() <= max($vertex1[0], $vertex2[0]) && $vertex1[1] !== $vertex2[1]) {
                    $xinters = ($point->getY() - $vertex1[1]) * ($vertex2[0] - $vertex1[0]) / ($vertex2[1] - $vertex1[1]) + $vertex1[0];

                    if ($xinters === $point->getX()) {
                        // Again, we are on a boundary.
                        return true;
                    }

                    if ($vertex1[0] === $vertex2[0] || $point->getX() <= $xinters) {
                        // We have a single intersection.
                        $intersects++;
                    }
                }
            }

            // If we passed through an odd number of edges, we are in the polygon!
            return $intersects % 2 !== 0;
        }
    }
65890
public boolean containsPoint(int x, int y) {

        return isInRangeInclusive(getLeft(), (getLeft() + getWidth()) - 1, x)
            && isInRangeInclusive(getTop(), (getTop() + getHeight()) - 1, y);
    }
739604
public boolean contains(Vector3 p) {
		boolean ans = false;
		if(this.halfplane || p== null) return false;

		if (isCorner(p)) {
			return true;
		}

		PointLinePosition a12 = PointLineTest.pointLineTest(a,b,p);
		PointLinePosition a23 = PointLineTest.pointLineTest(b,c,p);
		PointLinePosition a31 = PointLineTest.pointLineTest(c,a,p);

		if ((a12 == PointLinePosition.LEFT && a23 == PointLinePosition.LEFT && a31 == PointLinePosition.LEFT ) ||
				(a12 == PointLinePosition.RIGHT && a23 == PointLinePosition.RIGHT && a31 == PointLinePosition.RIGHT ) ||
				(a12 == PointLinePosition.ON_SEGMENT ||a23 == PointLinePosition.ON_SEGMENT ||  a31 == PointLinePosition.ON_SEGMENT)) {
			ans = true;
		}

		return ans;
	}
956234
public static boolean isPointInsideView(float x, float y, View view) {
        int location[] = new int[2];
        view.getLocationOnScreen(location);
        int viewX = location[0];
        int viewY = location[1];

        //point is inside view bounds
        if ((viewX < x && x < (viewX + view.getWidth())) &&
                (viewY < y && y < (viewY + view.getHeight()))) {
            return true;
        } else {
            return false;
        }
    }
1084507
public boolean containsPoint2D(double[] v) {
    assert (v.length == 2);
    final double testx = v[0];
    final double testy = v[1];
    boolean c = false;

    Iterator<double[]> it = points.iterator();
    double[] pre = points.get(points.size() - 1);
    while(it.hasNext()) {
      final double[] cur = it.next();
      final double curx = cur[0], cury = cur[1];
      final double prex = pre[0], prey = pre[1];
      if(((cury > testy) != (prey > testy))) {
        if((testx < (prex - curx) * (testy - cury) / (prey - cury) + curx)) {
          c = !c;
        }
      }
      pre = cur;
    }
    return c;
  }
961654
def contains_point(self, pt):
    """"""
    return (self.l < pt.x and self.r > pt.x and
            self.t < pt.y and self.b > pt.y)
1281864
public TriangulationPoint pointCCW( TriangulationPoint point )
    {
        if( point == points[0] )
        {
            return points[1];
        }
        else if( point == points[1] )
        {
            return points[2];
        }
        else if( point == points[2] )
        {
            return points[0];
        }
        logger.error( "point location error" );
        throw new RuntimeException("[FIXME] point location error");
    }
659101
private static boolean checkVerticesForIntersection_(
			MultiVertexGeometryImpl geom, RasterizedGeometry2D rgeom) {
		// Do a quick raster test for each point. If any point is inside, then
		// there is an intersection.
		int pointCount = geom.getPointCount();
		Point2D pt = new Point2D();
		for (int ipoint = 0; ipoint < pointCount; ipoint++) {
			geom.getXY(ipoint, pt);
			RasterizedGeometry2D.HitType hit = rgeom.queryPointInGeometry(pt.x,
					pt.y);
			if (hit == RasterizedGeometry2D.HitType.Inside) {
				return true;
			}
		}

		return false;
	}
18415
public static boolean contains(SpatialComparable box, double[] point) {
    final int dim = box.getDimensionality();
    if(dim != point.length) {
      throw new IllegalArgumentException("This HyperBoundingBox and the given point need same dimensionality");
    }

    for(int i = 0; i < dim; i++) {
      if(box.getMin(i) > point[i] || box.getMax(i) < point[i]) {
        return false;
      }
    }
    return true;
  }
164823
function isPointOnLineSegment(line1p1, line1p2, point) {
    if (line1p2.lat <= Math.max(line1p1.lat, point.lat) && line1p2.lat >= Math.min(line1p1.lat, point.lat) &&
        line1p2.lon <= Math.max(line1p1.lon, point.lon) && line1p2.lon >= Math.min(line1p1.lon, point.lon)) {
        return true;
    }
    return false;
}
1126710
function isPointInsidePoly(point, polygon) {
    let i,
        nvert = polygon.length,
        j = nvert - 1,
        c = false;
    for (i = 0; i < nvert; j = i++) {
        if (((polygon[i].lon > point.lon) !== (polygon[j].lon > point.lon)) &&
            (point.lat < (polygon[j].lat - polygon[i].lat) * (point.lon - polygon[i].lon) /
            (polygon[j].lon - polygon[i].lon) + polygon[i].lat)) {
            c = !c;
            //console.log(i, j, polygon[i].lon, '>', point.lon, c);
        }
    }
    return c;
}
1335040
private static boolean intersectsPoint(Geometry point, Geometry geometry) {
		if (geometry.getGeometries() != null) {
			for (Geometry child : geometry.getGeometries()) {
				if (intersectsPoint(point, child)) {
					return true;
				}
			}
		}
		if (geometry.getCoordinates() != null) {
			Coordinate coordinate = point.getCoordinates()[0];
			if (geometry.getCoordinates().length == 1) {
				return coordinate.equals(geometry.getCoordinates()[0]);
			} else {
				for (int i = 0; i < geometry.getCoordinates().length - 1; i++) {
					double distance = MathService.distance(geometry.getCoordinates()[i],
							geometry.getCoordinates()[i + 1], coordinate);
					if (distance < DEFAULT_DOUBLE_DELTA) {
						return true;
					}
				}
			}
		}
		return false;
	}
40472
public TriangulationPoint pointCW( TriangulationPoint point )
    {
        if( point == points[0] )
        {
            return points[2];
        }
        else if( point == points[1] )
        {
            return points[0];
        }
        else if( point == points[2] )
        {
            return points[1];
        }
        logger.error( "point location error" );
        throw new RuntimeException("[FIXME] point location error");
    }
171031
public Triangle findCellTriangleOf(Point3D point) {
        int x_index = (int) ((point.x - indexRegion.minX()) / x_size);
        int y_index = (int) ((point.y - indexRegion.minY()) / y_size);
        return grid[x_index][y_index];
    }