Esempio n. 1
0
 public void GatherData27(Func <IntVector3, ChunkGenData> GetChunk)
 {
     foreach (var chunkPos in Cube27.NeighborsOfIncludingCenter(center))
     {
         neighbors.Set(chunkPos, GetChunk(chunkPos));
     }
 }
Esempio n. 2
0
        private void SetUp(NeighborChunkGenData nei, VertexLocalLightJob job, int lodIndex, Allocator allo)
        {
            job.locks          = new object[nei.centerChunkData.displays.getLengths()[lodIndex]];
            job.display        = new NativeArray <VoxelGeomDataMirror>(nei.centerChunkData.displays[lodIndex], allo);
            job.chunkSize      = vGenConfig.ChunkSize;
            job.SizeOfHLSLUInt = VGenConfig.SizeOfHLSLInt;

            var cubeOfExists27 = new  NativeNeighbors27 <NativeArray <uint> >(nei.center, allo);

            foreach (var pos in Cube27.NeighborsOfIncludingCenter(nei.center))
            {
                cubeOfExists27.Set(pos, new NativeArray <uint>(nei.Get(pos).ExistsMap, allo));
            }

            job.cubeOfExists = cubeOfExists27;
        }