Generate(CombinedMesh mesh, int pointCount) { var output = MemoryUtil.Array <SamplePoint>(pointCount); new GenerationJob { Vertices = mesh.Vertices, Indices = mesh.Indices, TotalArea = CalculateTotalArea(mesh), Output = output }.Run(); return(output); }
public static float CalculateTotalArea(CombinedMesh mesh) { using (var temp = MemoryUtil.Array <float>(1)) { new AccumulationJob { Vertices = mesh.Vertices, Indices = mesh.Indices, Output = temp }.Run(); return(temp[0]); } }