| 16 | } |
| 17 | |
| 18 | void VoxelSlice::setBit(Vec2<int> pos, bool b) |
| 19 | { |
| 20 | if (pos.x < 0 || pos.x >= this->size.x || pos.y < 0 || pos.y >= this->size.y) |
| 21 | { |
| 22 | return; |
| 23 | } |
| 24 | this->bits[pos.y * this->size.x + pos.x] = b; |
| 25 | } |
| 26 | |
| 27 | VoxelMap::VoxelMap(Vec3<int> size) : size(size) { slices.resize(size.z); } |
| 28 |
no outgoing calls