double TOL = 1e-8;
if (!p1.getBounds().intersects(b)) {
return PolygonType.OUTSIDE;
}
Vector3d rayCenter = p1.centroid();
<BUG>Vector3d rayDirection = p1.plane.normal;
</BUG>
List<RayIntersection> intersections = getPolygonsThatIntersectWithRay(
rayCenter, rayDirection, polygons, TOL);
if (intersections.isEmpty()) {

double TOL = 1e-8;
if (!p1.getBounds().intersects(b)) {
return PolygonType.OUTSIDE;
}
Vector3d rayCenter = p1.centroid();
Vector3d rayDirection = p1.plane.getNormal();
List<RayIntersection> intersections = getPolygonsThatIntersectWithRay(
rayCenter, rayDirection, polygons, TOL);
if (intersections.isEmpty()) {
