Example #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="PrimitiveSurface" /> class.
 /// </summary>
 /// <param name="faces">The faces.</param>
 protected PrimitiveSurface(IEnumerable <PolygonalFace> faces)
 {
     Type  = PrimitiveSurfaceType.Unknown;
     Faces = faces.ToList();
     foreach (var face in faces)
     {
         face.BelongsToPrimitive = this;
     }
     Area     = Faces.Sum(f => f.Area);
     Vertices = Faces.SelectMany(f => f.Vertices).Distinct().ToList();
 }