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

Method setSlice

library/voxel.cpp:45–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void VoxelMap::setSlice(int z, sp<VoxelSlice> slice)
46{
47 this->centreChanged = true;
48 if (z < 0 || static_cast<unsigned>(z) >= this->slices.size())
49 {
50 return;
51 }
52 // Slices greater than map size are fine, we will just ignore extra pixels
53 if (slice->getSize().x < this->size.x || slice->getSize().y < this->size.y)
54 {
55 return;
56 }
57 this->slices[z] = slice;
58}
59
60void VoxelMap::calculateCentre()
61{

Callers 5

extractAgentBodyTypesMethod · 0.80
extractVehiclesMethod · 0.80
mainFunction · 0.80
test_voxelFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by 2

mainFunction · 0.64
test_voxelFunction · 0.64