/// <summary> /// Creates <see cref="QuadEdgeTriangle"/>s for all facets of a /// <see cref="QuadEdgeSubdivision"/> representing a triangulation. /// The <tt>data</tt> attributes of the <see cref="QuadEdge"/>s in the subdivision /// will be set to point to the triangle which contains that edge. /// This allows tracing the neighbour triangles of any given triangle. /// </summary> /// <param name="subdiv">The QuadEdgeSubdivision to create the triangles on.</param> /// <returns>A List of the created QuadEdgeTriangles</returns> public static IList <QuadEdgeTriangle> CreateOn(QuadEdgeSubdivision subdiv) { var visitor = new QuadEdgeTriangleBuilderVisitor(); subdiv.VisitTriangles(visitor, false); return(visitor.GetTriangles()); }
/// <summary> /// Creates <see cref="QuadEdgeTriangle"/>s for all facets of a /// <see cref="QuadEdgeSubdivision"/> representing a triangulation. /// The <tt>data</tt> attributes of the <see cref="QuadEdge"/>s in the subdivision /// will be set to point to the triangle which contains that edge. /// This allows tracing the neighbour triangles of any given triangle. /// </summary> /// <param name="subdiv">The QuadEdgeSubdivision to create the triangles on.</param> /// <returns>A List of the created QuadEdgeTriangles</returns> public static IList<QuadEdgeTriangle> CreateOn(QuadEdgeSubdivision subdiv) { var visitor = new QuadEdgeTriangleBuilderVisitor(); subdiv.VisitTriangles(visitor, false); return visitor.GetTriangles(); }