/// <summary> /// A new indexed star lookup wrapping a single body definition. /// </summary> /// <param name="body">The body to index</param> /// <param name="offset">An optional offset in vertex array</param> public FacetStars(FaceBody body, PtOffsetArray ptOffsetArray) { _index = new Dictionary <uint, List <Facet> >(); Body = body; PtOffsetArray = ptOffsetArray; Ingest(body); }
public MeshPtOffsetArray(Mesh mesh, PtOffsetArray offsetArray) { Mesh = mesh; PtOffsetArray = offsetArray; }
public FacetVisitor(PtOffsetArray ptOffsetArray, params FaceBody[] faceBodies) { PtOffsetArray = ptOffsetArray; BodyArray = faceBodies.Select(b => b).ToArray(); }
/// <summary> /// Creates an enumerable of facets referring to a single mesh and point array. /// </summary> /// <param name="mesh"></param> /// <param name="offsetArray"></param> /// <returns></returns> public static IEnumerable <Facet> ToFacets(this Mesh mesh, PtOffsetArray offsetArray) { var offsetMesh = new MeshPtOffsetArray(mesh, offsetArray); return(Enumerable.Range(0, mesh.FacetCount()).Select(index => new Facet(offsetMesh, index))); }