Ejemplo n.º 1
0
        private static ItNode add_intersection( ItNode it_node, 
			EdgeNode edge0, 
			EdgeNode  edge1,
			double x, 
			double y)
        {
            if (it_node == null)
            {
                /* Append a new node to the tail of the list */
                it_node = new ItNode( edge0, edge1, x, y, null );
            }
            else
            {
                if ( it_node.point.Y > y)
                {
                    /* Insert a new node mid-list */
                    ItNode existing_node = it_node ;
                    it_node = new ItNode( edge0, edge1, x, y, existing_node );
                }
                else
                {
                    /* Head further down the list */
                    it_node.next = add_intersection( it_node.next, edge0, edge1, x, y);
                }
            }
            return it_node ;
        }
Ejemplo n.º 2
0
            public PointF point = new PointF(); /* Point of intersection             */

            #endregion Fields

            #region Constructors

            public ItNode( EdgeNode edge0, EdgeNode edge1, double x, double y, ItNode next )
            {
                this.ie[0] = edge0 ;
                this.ie[1] = edge1 ;
                this.point.X = (float) x ;
                this.point.Y = (float) y ;
                this.next = next ;
            }