public static void BlockVectors2ChunkData(List <BlockVector> list, B45ChunkData chunkData) { for (int i = 0; i < list.Count; i++) { BlockVector bv = list[i]; chunkData.WriteVoxelAtIdx(bv.x, bv.y, bv.z, new B45Block(bv.byte0, bv.byte1)); } }
void Update() { if (bStartRead) { bStartRead = false; int index = _data.IsHollow ? 0 : B45ChunkData.OneIndexNoPrefix(xnpre, ynpre, znpre); int indexVT = index * B45Block.Block45Size; vol = _data.DataVT[indexVT]; } if (bApplyWrite) { bApplyWrite = false; int index = _data.IsHollow ? 0 : B45ChunkData.OneIndexNoPrefix(xnpre, ynpre, znpre); int indexVT = index * B45Block.Block45Size; _data.WriteVoxelAtIdx(xnpre - VoxelTerrainConstants._numVoxelsPrefix, ynpre - VoxelTerrainConstants._numVoxelsPrefix, znpre - VoxelTerrainConstants._numVoxelsPrefix, new B45Block(vol, _data.DataVT[indexVT + 1])); } }