Work on volume memory management.

This commit is contained in:
David Williams
2009-04-10 08:56:37 +00:00
parent 19ed8246ff
commit df68b1fe7a
5 changed files with 53 additions and 40 deletions

View File

@ -34,7 +34,6 @@ namespace PolyVox
{
public:
POLYVOX_SHARED_PTR< BlockData<VoxelType> > m_pBlockData;
bool m_bIsPotentiallySharable;
};
}

View File

@ -152,14 +152,12 @@ namespace PolyVox
template <typename VoxelType>
bool BlockData<VoxelType>::isHomogeneous(void)
{
VoxelType currentVoxel = m_tData;
VoxelType firstVal = *currentVoxel;
const VoxelType tFirstVoxel = m_tData[0];
const uint32_t uNoOfVoxels = m_uSideLength * m_uSideLength * m_uSideLength;
uint32_t uNoOfVoxels = m_uSideLength * m_uSideLength * m_uSideLength;
for(uint32_t ct = 1; ct < uNoOfVoxels; ++ct)
{
++currentVoxel;
if(*currentVoxel != firstVal)
if(m_tData[ct] != tFirstVoxel)
{
return false;
}