public MultiPolygon3(IPolygon3 uniqueCompoenent) { _components = uniqueCompoenent.AsSingleton(); _componentCount = 1; _totalVertexCount = uniqueCompoenent.InPlane.CountVertices(); _vertices = new VertexCollection(this); _edges = new EdgeColllection(this); _faces = new FaceCollection(this); _undirectedEdgeComparer = new UndirectedEdgeComparerImpl(this); }
public MultiPolygon3(IEnumerable <IPolygon3> components) { _components = components.ToReadOnlyList(); _componentCount = _components.Count(); _totalVertexCount = _components.Select(p => p.InPlane.CountVertices()).Sum(); _vertices = new VertexCollection(this); _edges = new EdgeColllection(this); _faces = new FaceCollection(this); _undirectedEdgeComparer = new UndirectedEdgeComparerImpl(this); }