MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / setBit

Method setBit

library/voxel.cpp:18–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18void 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
27VoxelMap::VoxelMap(Vec3<int> size) : size(size) { slices.resize(size.z); }
28

Callers 4

loadVoxelSliceMethod · 0.80
LOFTempsMethod · 0.80
mainFunction · 0.80
test_voxelFunction · 0.80

Calls

no outgoing calls

Tested by 2

mainFunction · 0.64
test_voxelFunction · 0.64