Esempio n. 1
0
        }         // public ArrayList Build( int opCode )

        /// <summary>
        /// Find and mark L edges which are "covered" by the result area (if any).
        /// L edges at nodes which also have A edges can be checked by checking their
        /// depth at that node.  L edges at nodes which do not have A edges can be
        /// checked by doing a point-in-polygon test with the previously computed result areas.
        /// </summary>
        private void FindCoveredLineEdges()
        {
            // first set covered for all L edges at nodes which have A edges too
            foreach (DictionaryEntry obj in _op.Graph.Nodes)
            {
                Node node = (Node)obj.Value;
                //Trace.WriteLine( node.ToString() );
                ((DirectedEdgeStar)node.Edges).FindCoveredLineEdges();
            }

            // For all L edges which weren't handled by the above,
            // use a point-in-poly test to determine whether they are covered
            foreach (object obj in _op.Graph.EdgeEnds)
            {
                DirectedEdge de = (DirectedEdge)obj;
                Edge         e  = de.Edge;
                if (de.IsLineEdge && !e.IsCoveredSet)
                {
                    bool isCovered = _op.IsCoveredByA(de.Coordinate);
                    e.SetCovered = isCovered;
                }
            }
        }         // private void FindCoveredLineEdges()