Beispiel #1
0
        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);
        }
Beispiel #2
0
 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]);
     }
 }