Ejemplo n.º 1
0
        public bool PointIsBelowSegmentIntersection_Outside_Segment(double yPtN, double yIntersection)
        {
            Point vertexI = new Point(1, -1);
            Point vertexJ = new Point(2, 1);

            return(ProjectionVertical.PointIsBelowSegmentIntersection(yPtN, yIntersection, vertexI, vertexJ));
        }
Ejemplo n.º 2
0
        [TestCase(2.1, ExpectedResult = 2)] // Top of segment
        public double IntersectionPointY_Horizontal(double xPtN)
        {
            Point ptI = new Point(2, 2);
            Point ptJ = new Point(3, 2);

            return(ProjectionVertical.IntersectionPointY(xPtN, ptI, ptJ));
        }
Ejemplo n.º 3
0
        [TestCase(3.5, ExpectedResult = 5)] // Top of segment
        public double IntersectionPointY_Sloped(double xPtN)
        {
            Point ptI = new Point(2, 2);
            Point ptJ = new Point(3, 4);

            return(ProjectionVertical.IntersectionPointY(xPtN, ptI, ptJ));
        }
Ejemplo n.º 4
0
        public bool PointIsBelowSegmentBottom_Sloped_Segment(double yPtN, double yBottomEnd, double yTopEnd)
        {
            Point ptI = new Point(10, yBottomEnd);
            Point ptJ = new Point(20, yTopEnd);

            return(ProjectionVertical.PointIsBelowSegmentBottom(yPtN, ptI, ptJ));
        }
Ejemplo n.º 5
0
        public bool PointIsWithinSegmentWidth_Sloped(double xPtN, double xLeftEnd, double xRightEnd)
        {
            Point ptI = new Point(xLeftEnd, 1);
            Point ptJ = new Point(xRightEnd, 15);

            return(ProjectionVertical.PointIsWithinSegmentWidth(xPtN, ptI, ptJ));
        }
Ejemplo n.º 6
0
        public void NumberOfIntersections_Of_Polyline_Throws_Argument_Exception()
        {
            Point coordinate = new Point(1, 1);

            Assert.That(() => ProjectionVertical.NumberOfIntersections(coordinate, polyline.ToArray()),
                        Throws.Exception
                        .TypeOf <ArgumentException>());
        }
Ejemplo n.º 7
0
        public void IntersectionPointY_Vertical_Throws_Argument_Exception()
        {
            Point ptI = new Point(2, 2);
            Point ptJ = new Point(2, 4);

            Assert.That(() => ProjectionVertical.IntersectionPointY(2, ptI, ptJ),
                        Throws.Exception
                        .TypeOf <ArgumentException>());
        }
Ejemplo n.º 8
0
        public int NumberOfIntersections_Intersection_Multiple_Solid_Void(double y)
        {
            Point coordinate = new Point(1, y);

            return(ProjectionVertical.NumberOfIntersections(coordinate, comb.ToArray()));
        }
Ejemplo n.º 9
0
        public int NumberOfIntersections_Left_Of_Square(double y)
        {
            Point coordinate = new Point(6, y);

            return(ProjectionVertical.NumberOfIntersections(coordinate, square.ToArray()));
        }
Ejemplo n.º 10
0
        public int NumberOfIntersections_Between_Left_And_Right_of_Square(double y)
        {
            Point coordinate = new Point(1, y);

            return(ProjectionVertical.NumberOfIntersections(coordinate, square.ToArray()));
        }