Hi,
I have been reading a few of the threads of the forum and noted that you were planning to make changes to the volume structure including introducing RLE encoding. I am just wondering whether you will maintain or remove homogenous blocks?
I ask because presently if I want to free some memory I can set all the voxels in an area I am no longer using to the same value then call tidyUpMemory.
Of course this is not very efficient, so I was thinking of adding a function like:
template <typename VoxelType> void Volume<VoxelType>::homogenizeBlockContainingVoxelAt(uint16_t x, uint16_t y, uint16_t z, VoxelType voxelData)
which would basically just find the matching block and call getHomogenousBlock(voxelData), which would be quicker than manually setting every voxel and then calling tidyUpMemory()
But if homogenous blocks are going away, then there's not much point in me doing this.
|