Added setVoxel() funtion to volume iterators.
Fixed bugs with RawVolume iterator movement funtions. Proper implementation of RawVolume peek...() functions.
This commit is contained in:
@ -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
|
Reference in New Issue
Block a user