コード例 #1
0
        public bool SharesCorner(VEdge lastEdge, out Corner sharedCorner)
        {
            if (lastEdge == this)
            {
                throw new System.Exception("Trying to find shared corner with self");
            }
            sharedCorner = null;
            if (lastEdge.Contains(start))
            {
                sharedCorner = start;
            }
            else if (lastEdge.Contains(end))
            {
                sharedCorner = end;
            }

            return(sharedCorner != null);
        }
コード例 #2
0
        public List <Polygon> GetSharedPolygons(VEdge edge)
        {
            List <Polygon> shared = new List <Polygon>();

            foreach (Polygon poly in polygons)
            {
                if (edge.Contains(poly))
                {
                    shared.Add(poly);
                }
            }
            return(shared);
        }