/** {@inheritDoc} */ @Override public boolean containsNaN() { return minPoint.containsNaN() || maxPoint.containsNaN(); }
@Override public boolean isCommandValid() { return !manifoldOriginPosition.containsNaN() && !manifoldOriginOrientation.containsNaN(); }
/** * Tests if this plane contains {@link Double#NaN}. * * @return {@code true} if {@code point} and/or {@code normal} contains {@link Double#NaN}, * {@code false} otherwise. */ @Override public boolean containsNaN() { return point.containsNaN() || normal.containsNaN(); }
private void runSomeTestsWithPointInside(Shape3D<?> shape3d, Point3D pointInside) { // Check to make sure the point is actually inside: Point3D pointOnSurface = new Point3D(); Vector3D surfaceNormal = new Vector3D(); boolean isInside = shape3d.checkIfInside(pointInside, pointOnSurface, surfaceNormal); assertTrue(isInside); assertFalse(surfaceNormal.containsNaN()); assertFalse(pointOnSurface.containsNaN()); runSomeTestsWithPointOnSurface(shape3d, pointOnSurface, surfaceNormal); }
private void runSomeTestsWithPointOutside(Shape3D<?> shape3d, Point3D pointOutside) { // Check to make sure the point is actually outside: Point3D pointOnSurface = new Point3D(); Vector3D surfaceNormal = new Vector3D(); boolean isInside = shape3d.checkIfInside(pointOutside, pointOnSurface, surfaceNormal); assertFalse(isInside); if (pointOnSurface.containsNaN()) { assertTrue(surfaceNormal.containsNaN()); pointOnSurface.set(pointOutside); shape3d.orthogonalProjection(pointOnSurface); } runSomeTestsWithPointOnSurface(shape3d, pointOnSurface, surfaceNormal); }
boolean isInside = shape3d.checkIfInside(pointOnSurface, newProjection, newNormal); if (newProjection.containsNaN())