Added setVoxel() funtion to volume iterators.

Fixed bugs with RawVolume iterator movement funtions.
Proper implementation of RawVolume peek...() functions.
This commit is contained in:
David Williams
2011-08-15 21:10:09 +01:00
parent c73b45b721
commit 90063354bd
11 changed files with 254 additions and 31 deletions

View File

@ -26,12 +26,13 @@ freely, subject to the following restrictions:
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/Region.h"
#include <limits>
#define BORDER_LOW(x) ((( x >> this->mVolume->m_uBlockSideLengthPower) << this->mVolume->m_uBlockSideLengthPower) != x)
#define BORDER_HIGH(x) ((( (x+1) >> this->mVolume->m_uBlockSideLengthPower) << this->mVolume->m_uBlockSideLengthPower) != (x+1))
//#define BORDER_LOW(x) (( x % mVolume->m_uBlockSideLength) != 0)
//#define BORDER_HIGH(x) (( x % mVolume->m_uBlockSideLength) != mVolume->m_uBlockSideLength - 1)
#include <limits>
namespace PolyVox
{
template <typename VoxelType>
@ -159,6 +160,15 @@ namespace PolyVox
}
}
template <typename VoxelType>
bool LargeVolume<VoxelType>::Sampler::setVoxel(VoxelType tValue)
{
//*mCurrentVoxel = tValue;
//Need to think what effect this has on any existing iterators.
assert(false);
return false;
}
template <typename VoxelType>
void LargeVolume<VoxelType>::Sampler::movePositiveX(void)
{
@ -525,3 +535,6 @@ namespace PolyVox
return this->mVolume->getVoxelAt(this->mXPosInVolume+1,this->mYPosInVolume+1,this->mZPosInVolume+1);
}
}
#undef BORDER_LOW
#undef BORDER_HIGH