Fixed bug with checking the wrong direction before peeking.

This commit is contained in:
Daviw Williams 2012-11-30 16:08:35 +01:00
parent 256e289c8f
commit b57cec96a3

View File

@ -247,7 +247,7 @@ namespace PolyVox
template <typename VoxelType> template <typename VoxelType>
VoxelType RawVolume<VoxelType>::Sampler::peekVoxel0px1ny1nz(void) const VoxelType RawVolume<VoxelType>::Sampler::peekVoxel0px1ny1nz(void) const
{ {
if(checkValidFlags(Current | NegativeX | NegativeZ)) if(checkValidFlags(Current | NegativeY | NegativeZ))
{ {
return *(mCurrentVoxel - this->mVolume->getWidth() - this->mVolume->getWidth() * this->mVolume->getHeight()); return *(mCurrentVoxel - this->mVolume->getWidth() - this->mVolume->getWidth() * this->mVolume->getHeight());
} }