Renamed a bunch of stuff from using 'block' to 'chunk'

This commit is contained in:
David Williams
2014-09-20 17:39:12 +02:00
parent ede35435a0
commit 8d7d88a7df
8 changed files with 165 additions and 165 deletions

View File

@ -90,7 +90,7 @@ public:
/// Destructor
virtual ~PerlinNoisePager() {};
virtual void pageIn(const PolyVox::Region& region, Chunk<MaterialDensityPair44>* pBlockData)
virtual void pageIn(const PolyVox::Region& region, Chunk<MaterialDensityPair44>* pChunk)
{
// FIXME - this isn't a great example... it's a shame we have to hard clode the block size and also create/destroy
// a compressor each time. These could at least be moved outside somewhere if we can't fix it in a better way...
@ -132,18 +132,18 @@ public:
// Voxel position within a block always start from zero. So if a block represents region (4, 8, 12) to (11, 19, 15)
// then the valid block voxels are from (0, 0, 0) to (7, 11, 3). Hence we subtract the lower corner position of the
// region from the volume space position in order to get the block space position.
pBlockData->setVoxelAt(x - region.getLowerX(), y - region.getLowerY(), z - region.getLowerZ(), voxel);
pChunk->setVoxelAt(x - region.getLowerX(), y - region.getLowerY(), z - region.getLowerZ(), voxel);
}
}
}
// Now compress the computed data into the provided block.
//RLEBlockCompressor<MaterialDensityPair44>* compressor = new RLEBlockCompressor<MaterialDensityPair44>();
//compressor->compress(&block, pBlockData);
//compressor->compress(&block, pChunk);
//delete compressor;
}
virtual void pageOut(const PolyVox::Region& region, Chunk<MaterialDensityPair44>* /*pBlockData*/)
virtual void pageOut(const PolyVox::Region& region, Chunk<MaterialDensityPair44>* /*pChunk*/)
{
std::cout << "warning unloading region: " << region.getLowerCorner() << " -> " << region.getUpperCorner() << std::endl;
}