コード例 #1
0
 /// <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);
 }
コード例 #2
0
 public MeshPtOffsetArray(Mesh mesh, PtOffsetArray offsetArray)
 {
     Mesh          = mesh;
     PtOffsetArray = offsetArray;
 }
コード例 #3
0
 public FacetVisitor(PtOffsetArray ptOffsetArray, params FaceBody[] faceBodies)
 {
     PtOffsetArray = ptOffsetArray;
     BodyArray     = faceBodies.Select(b => b).ToArray();
 }
コード例 #4
0
        /// <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)));
        }