Going back to building key by shifting instead of using bitfield.

This commit is contained in:
David Williams
2015-03-21 08:05:58 +01:00
parent 0e995b5140
commit 0d638f9837
3 changed files with 30 additions and 38 deletions

View File

@ -97,7 +97,7 @@ namespace PolyVox
// Base version updates position and validity flags.
BaseVolume<VoxelType>::template Sampler< PagedVolume<VoxelType> >::setPosition(xPos, yPos, zPos);
const int32_t key = this->mVolume->posToChunkKey(xPos, yPos, zPos);
const uint64_t key = this->mVolume->posToChunkKey(xPos, yPos, zPos);
// Then we update the voxel pointer.
auto pCurrentChunk = (key == this->mVolume->m_v3dLastAccessedChunkKey) ? this->mVolume->m_pLastAccessedChunk : this->mVolume->getChunk(key);