Beispiel #1
0
        public static void plot4points(
            Point3D loc, Map map, int x, int y, CirclePoint start, CirclePoint end,
            DoEffect_Callback effect, bool opposite
            )
        {
            var pointA = new Point2D(loc.X - x, loc.Y - y);
            var pointB = new Point2D(loc.X - y, loc.Y - x);

            var quadrant = 2;

            if (x == 0 && start.Quadrant == 3)
            {
                quadrant = 3;
            }

            if (WithinCircleBounds(quadrant == 3 ? pointB : pointA, quadrant, loc, start, end, opposite))
            {
                effect(new Point3D(loc.X + x, loc.Y + y, loc.Z), map);
            }

            quadrant = 3;

            if (y == 0 && start.Quadrant == 0)
            {
                quadrant = 0;
            }

            if (x != 0 && WithinCircleBounds(quadrant == 0 ? pointA : pointB, quadrant, loc, start, end, opposite))
            {
                effect(new Point3D(loc.X - x, loc.Y + y, loc.Z), map);
            }

            if (y != 0 && WithinCircleBounds(pointB, 1, loc, start, end, opposite))
            {
                effect(new Point3D(loc.X + x, loc.Y - y, loc.Z), map);
            }

            if (x != 0 && y != 0 && WithinCircleBounds(pointA, 0, loc, start, end, opposite))
            {
                effect(new Point3D(loc.X - x, loc.Y - y, loc.Z), map);
            }
        }
Beispiel #2
0
 public static void Circle2D(Point3D loc, Map map, int radius, DoEffect_Callback effect)
 {
     Circle2D(loc, map, radius, effect, 0, 360);
 }