コード例 #1
0
        public Geometry[] GenerateGeometryAccum(double angle1, double angle2)
        {
            var    rrFact    = new RotatedRectangleFactory();
            double basex     = angle2 * MAX_DISPLACEMENT - (MAX_DISPLACEMENT / 2);
            var    baseCoord = new Coordinate(basex, basex);
            var    rr1       = rrFact.CreateRectangle(100, 20, angle1, baseCoord);

            // limit size of accumulated star
            _geomCount++;
            if (_geomCount >= BATCH_SIZE)
            {
                _geomCount = 0;
            }
            if (_geomCount == 0)
            {
                _baseAccum = null;
            }

            if (_baseAccum == null)
            {
                _baseAccum = rr1;
            }
            else
            {
                // this line can be used to test for the presence of noding failures for
                // non-tricky cases
                // Geometry star = rr2;
                _baseAccum = rr1.Union(_baseAccum);
            }
            return(new[] { _baseAccum, rr1 });
        }
コード例 #2
0
        public IGeometry[] GenerateGeometryAccum(double angle1, double angle2)
        {
            var rrFact = new RotatedRectangleFactory();
            var basex = angle2 * MAX_DISPLACEMENT - (MAX_DISPLACEMENT / 2);
            var baseCoord = new Coordinate(basex, basex);
            var rr1 = rrFact.CreateRectangle(100, 20, angle1, baseCoord);

            // limit size of accumulated star
            _geomCount++;
            if (_geomCount >= BATCH_SIZE)
                _geomCount = 0;
            if (_geomCount == 0)
                _baseAccum = null;

            if (_baseAccum == null)
                _baseAccum = rr1;
            else
            {
                // this line can be used to test for the presence of noding failures for
                // non-tricky cases
                // Geometry star = rr2;
                _baseAccum = rr1.Union(_baseAccum);
            }
            return new[] { _baseAccum, rr1 };
        }
コード例 #3
0
        public IGeometry[] GenerateGeometryStar(double angle1, double angle2)
        {
            var rrFact = new RotatedRectangleFactory();
            var rr1 = rrFact.CreateRectangle(100, 20, angle1);
            var rr2 = rrFact.CreateRectangle(100, 20, angle2);

            // this line can be used to test for the presence of noding failures for
            // non-tricky cases
            // Geometry star = rr2;
            var star = rr1.Union(rr2);
            return new[] { star, rr1 };
        }
コード例 #4
0
        public Geometry[] GenerateGeometryStar(double angle1, double angle2)
        {
            var rrFact = new RotatedRectangleFactory();
            var rr1    = rrFact.CreateRectangle(100, 20, angle1);
            var rr2    = rrFact.CreateRectangle(100, 20, angle2);

            // this line can be used to test for the presence of noding failures for
            // non-tricky cases
            // Geometry star = rr2;
            var star = rr1.Union(rr2);

            return(new[] { star, rr1 });
        }