Exemplo n.º 1
0
        /// <summary>
        /// Performs a vertical sweep, calling the given event handler delegate.
        /// </summary>
        /// <param name="eventHandler"></param>
        public void VerticalSweep(HandleEvent eventHandler)
        {
            ISweepEvent <T> ev;

            while (Events.FindMin(out ev))
            {
                Events.DeleteMin();

                Line = new Line(ev.Pos, ev.Pos + new Vector2(1f, 0f));

                eventHandler(Events, Status, ev);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Performs a radial sweep from the given point, using the event handler delegate.
        /// </summary>
        /// <param name="a_pos"></param>
        /// <param name="eventHandler"></param>
        public void RadialSweep(Vector2 a_pos, HandleEvent eventHandler)
        {
            E ev;

            while (Events.FindMin(out ev))
            {
                Events.DeleteMin();

                Line = new Line(a_pos, ev.Pos);

                eventHandler(Events, Status, ev);
            }
        }