Plane implements Hyperplane<Euclidean3D>, Embedding<Euclidean3D, Euclidean2D> { public boolean contains(final Vector3D p) { return FastMath.abs(getOffset(p)) < 1.0e-10; } Plane(final Vector3D normal, final double tolerance);  Plane(final Vector3D p, final Vector3D normal, final double tolerance);  Plane(final Vector3D p1, final Vector3D p2, final Vector3D p3, final double tolerance); @Deprecated  Plane(final Vector3D normal); @Deprecated  Plane(final Vector3D p, final Vector3D normal); @Deprecated  Plane(final Vector3D p1, final Vector3D p2, final Vector3D p3);  Plane(final Plane plane); Plane copySelf(); void reset(final Vector3D p, final Vector3D normal); void reset(final Plane original); Vector3D getOrigin(); Vector3D getNormal(); Vector3D getU(); Vector3D getV(); Point<Euclidean3D> project(Point<Euclidean3D> point); double getTolerance(); void revertSelf(); Vector2D toSubSpace(Vector<Euclidean3D> vector); Vector3D toSpace(Vector<Euclidean2D> vector); Vector2D toSubSpace(final Point<Euclidean3D> point); Vector3D toSpace(final Point<Euclidean2D> point); Vector3D getPointAt(final Vector2D inPlane, final double offset); boolean isSimilarTo(final Plane plane); Plane rotate(final Vector3D center, final Rotation rotation); Plane translate(final Vector3D translation); Vector3D intersection(final Line line); Line intersection(final Plane other); static Vector3D intersection(final Plane plane1, final Plane plane2, final Plane plane3); SubPlane wholeHyperplane(); PolyhedronsSet wholeSpace(); boolean contains(final Vector3D p); double getOffset(final Plane plane); double getOffset(Vector<Euclidean3D> vector); double getOffset(final Point<Euclidean3D> point); boolean sameOrientationAs(final Hyperplane<Euclidean3D> other);  }
@Test public void testContains() throws MathArithmeticException { Plane p = new Plane(new Vector3D(0, 0, 1), new Vector3D(0, 0, 1), 1.0e-10); Assert.assertTrue(p.contains(new Vector3D(0, 0, 1))); Assert.assertTrue(p.contains(new Vector3D(17, -32, 1))); Assert.assertTrue(! p.contains(new Vector3D(17, -32, 1.001))); }
@Test public void testThreePoints() throws MathArithmeticException { Vector3D p1 = new Vector3D(1.2, 3.4, -5.8); Vector3D p2 = new Vector3D(3.4, -5.8, 1.2); Vector3D p3 = new Vector3D(-2.0, 4.3, 0.7); Plane p = new Plane(p1, p2, p3, 1.0e-10); Assert.assertTrue(p.contains(p1)); Assert.assertTrue(p.contains(p2)); Assert.assertTrue(p.contains(p3)); }