public ReadBuffer(ISettings settings, IBlockQueue emptyBlocks, IBlockQueue filledBlocks, int capacity) { this.settings = settings; this.EmptyBlocks = emptyBlocks; this.FilledBlocks = filledBlocks; for (int i = 0; i < capacity; i++) { EmptyBlocks.Enqueue(new DataBlock(settings.BlockSizeBytes)); } }
public Int3 GetGound(Double3 position) { Int3 block = position.Floor(); while (EmptyBlocks.Contains(this[block].Id)) { block += Int3.Down; } return(block); }