Package org.apache.commons.math3.geometry.euclidean.twod

Examples of org.apache.commons.math3.geometry.euclidean.twod.Line.toSubSpace()


            Vector2D point = l.toSpace(pA);
            Assert.assertEquals(a, (l.toSubSpace(point)).getX(), 1.0e-10);
            Assert.assertEquals(0.0, l.getOffset(point),   1.0e-10);
            for (double o = -2.0; o < 2.0; o += 0.2) {
                point = l.getPointAt(pA, o);
                Assert.assertEquals(a, (l.toSubSpace(point)).getX(), 1.0e-10);
                Assert.assertEquals(o, l.getOffset(point),   1.0e-10);
            }
        }
    }
View Full Code Here


    private SubHyperplane<Euclidean2D> buildHalfLine(Vector2D start, Vector2D end,
                                                     boolean startIsVirtual) {
        Line   line  = new Line(start, end);
        double lower = startIsVirtual
        ? Double.NEGATIVE_INFINITY
        : (line.toSubSpace(start)).getX();
        double upper = startIsVirtual
        ? (line.toSubSpace(end)).getX()
        : Double.POSITIVE_INFINITY;
        return new SubLine(line, new IntervalsSet(lower, upper));
    }
View Full Code Here

        Line   line  = new Line(start, end);
        double lower = startIsVirtual
        ? Double.NEGATIVE_INFINITY
        : (line.toSubSpace(start)).getX();
        double upper = startIsVirtual
        ? (line.toSubSpace(end)).getX()
        : Double.POSITIVE_INFINITY;
        return new SubLine(line, new IntervalsSet(lower, upper));
    }

    private SubHyperplane<Euclidean2D> buildSegment(Vector2D start, Vector2D end) {
View Full Code Here

        return new SubLine(line, new IntervalsSet(lower, upper));
    }

    private SubHyperplane<Euclidean2D> buildSegment(Vector2D start, Vector2D end) {
        Line   line  = new Line(start, end);
        double lower = (line.toSubSpace(start)).getX();
        double upper = (line.toSubSpace(end)).getX();
        return new SubLine(line, new IntervalsSet(lower, upper));
    }

    private void checkPoints(Region.Location expected, PolygonsSet set,
View Full Code Here

    }

    private SubHyperplane<Euclidean2D> buildSegment(Vector2D start, Vector2D end) {
        Line   line  = new Line(start, end);
        double lower = (line.toSubSpace(start)).getX();
        double upper = (line.toSubSpace(end)).getX();
        return new SubLine(line, new IntervalsSet(lower, upper));
    }

    private void checkPoints(Region.Location expected, PolygonsSet set,
                             Vector2D[] points) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.