internal Polysurface(IPartialPolysurface surface) { // must be copied to protect state integrity _vertices = surface.Vertices.ToReadOnlyList(); _edges = surface.Edges.ToReadOnlyList(); _faces = surface.Faces.ToReadOnlyList(); // TODO: Combinatorical integrity test!!! throw new NotImplementedException(); }
public static Box3 BoundingBox(this IPartialPolysurface @this) { return(Box3.Hull(@this.Vertices.Select(v => v.Point))); }
public static double Area(this IPartialPolysurface @this) { return(@this.Faces.Select(f => f.Polygon.Area()).Sum()); }