Renamed VlumeIterator to VolumeSampler.

This commit is contained in:
David Williams
2009-05-21 22:44:19 +00:00
parent 0888948138
commit 6e9c31d6bc
22 changed files with 121 additions and 121 deletions

View File

@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __PolyVox_GradientEstimators_H__
#define __PolyVox_GradientEstimators_H__
#include "VolumeIterator.h"
#include "VolumeSampler.h"
#include <vector>
@ -38,18 +38,18 @@ namespace PolyVox
};
template <typename VoxelType>
Vector3DFloat computeCentralDifferenceGradient(const VolumeIterator<VoxelType>& volIter);
Vector3DFloat computeCentralDifferenceGradient(const VolumeSampler<VoxelType>& volIter);
template <typename VoxelType>
Vector3DFloat computeSmoothCentralDifferenceGradient(VolumeIterator<VoxelType>& volIter);
Vector3DFloat computeSmoothCentralDifferenceGradient(VolumeSampler<VoxelType>& volIter);
template <typename VoxelType>
Vector3DFloat computeDecimatedCentralDifferenceGradient(VolumeIterator<VoxelType>& volIter);
Vector3DFloat computeDecimatedCentralDifferenceGradient(VolumeSampler<VoxelType>& volIter);
template <typename VoxelType>
Vector3DFloat computeSobelGradient(const VolumeIterator<VoxelType>& volIter);
Vector3DFloat computeSobelGradient(const VolumeSampler<VoxelType>& volIter);
template <typename VoxelType>
Vector3DFloat computeSmoothSobelGradient(VolumeIterator<VoxelType>& volIter);
Vector3DFloat computeSmoothSobelGradient(VolumeSampler<VoxelType>& volIter);
POLYVOXCORE_API void computeNormalsForVertices(Volume<uint8_t>* volumeData, IndexedSurfacePatch& isp, NormalGenerationMethod normalGenerationMethod);
POLYVOXCORE_API Vector3DFloat computeNormal(Volume<uint8_t>* volumeData, const Vector3DFloat& v3dPos, NormalGenerationMethod normalGenerationMethod);

View File

@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace PolyVox
{
template <typename VoxelType>
Vector3DFloat computeCentralDifferenceGradient(const VolumeIterator<VoxelType>& volIter)
Vector3DFloat computeCentralDifferenceGradient(const VolumeSampler<VoxelType>& volIter)
{
//FIXME - bitwise way of doing this?
VoxelType voxel1nx = volIter.peekVoxel1nx0py0pz() > 0 ? 1: 0;
@ -45,7 +45,7 @@ namespace PolyVox
}
template <typename VoxelType>
Vector3DFloat computeDecimatedCentralDifferenceGradient(const VolumeIterator<VoxelType>& volIter)
Vector3DFloat computeDecimatedCentralDifferenceGradient(const VolumeSampler<VoxelType>& volIter)
{
const uint16_t x = volIter.getPosX();
const uint16_t y = volIter.getPosY();
@ -70,7 +70,7 @@ namespace PolyVox
}
template <typename VoxelType>
Vector3DFloat computeSmoothCentralDifferenceGradient(VolumeIterator<VoxelType>& volIter)
Vector3DFloat computeSmoothCentralDifferenceGradient(VolumeSampler<VoxelType>& volIter)
{
uint16_t initialX = volIter.getPosX();
uint16_t initialY = volIter.getPosY();
@ -101,7 +101,7 @@ namespace PolyVox
}
template <typename VoxelType>
Vector3DFloat computeSobelGradient(const VolumeIterator<VoxelType>& volIter)
Vector3DFloat computeSobelGradient(const VolumeSampler<VoxelType>& volIter)
{
static const int weights[3][3][3] = { { {2,3,2}, {3,6,3}, {2,3,2} }, {
{3,6,3}, {6,0,6}, {3,6,3} }, { {2,3,2}, {3,6,3}, {2,3,2} } };
@ -184,7 +184,7 @@ namespace PolyVox
}
template <typename VoxelType>
Vector3DFloat computeSmoothSobelGradient(VolumeIterator<VoxelType>& volIter)
Vector3DFloat computeSmoothSobelGradient(VolumeSampler<VoxelType>& volIter)
{
static const int weights[3][3][3] = { { {2,3,2}, {3,6,3}, {2,3,2} }, {
{3,6,3}, {6,0,6}, {3,6,3} }, { {2,3,2}, {3,6,3}, {2,3,2} } };

View File

@ -52,7 +52,7 @@ namespace PolyVox
typedef Vector<3,uint32_t> Vector3DUint32;
//----------------------------
template <typename VoxelType> class VolumeIterator;
template <typename VoxelType> class VolumeSampler;
}
#endif

View File

@ -33,8 +33,8 @@ namespace PolyVox
template <typename VoxelType>
class Block
{
//Make VolumeIterator a friend
friend class VolumeIterator<VoxelType>;
//Make VolumeSampler a friend
friend class VolumeSampler<VoxelType>;
public:
Block(uint16_t uSideLength);
Block(const Block& rhs);

View File

@ -34,9 +34,9 @@ namespace PolyVox
uint32_t getDecimatedIndex(uint32_t x, uint32_t y, uint32_t regionWidth);
void extractDecimatedSurfaceImpl(Volume<uint8_t>* volumeData, uint8_t uLevel, Region region, IndexedSurfacePatch* singleMaterialPatch);
uint32_t computeDecimatedBitmaskForSlice(VolumeIterator<uint8_t>& volIter, uint8_t uLevel, const Region& regSlice, const Vector3DFloat& offset, uint8_t *bitmask, uint8_t *previousBitmask);
void generateDecimatedIndicesForSlice(VolumeIterator<uint8_t>& volIter, uint8_t uLevel, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8_t* bitmask0, uint8_t* bitmask1, int32_t vertexIndicesX0[],int32_t vertexIndicesY0[],int32_t vertexIndicesZ0[], int32_t vertexIndicesX1[],int32_t vertexIndicesY1[],int32_t vertexIndicesZ1[]);
void generateDecimatedVerticesForSlice(VolumeIterator<uint8_t>& volIter, uint8_t uLevel, Region& regSlice, const Vector3DFloat& offset, uint8_t* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32_t vertexIndicesX[],int32_t vertexIndicesY[],int32_t vertexIndicesZ[]);
uint32_t computeDecimatedBitmaskForSlice(VolumeSampler<uint8_t>& volIter, uint8_t uLevel, const Region& regSlice, const Vector3DFloat& offset, uint8_t *bitmask, uint8_t *previousBitmask);
void generateDecimatedIndicesForSlice(VolumeSampler<uint8_t>& volIter, uint8_t uLevel, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8_t* bitmask0, uint8_t* bitmask1, int32_t vertexIndicesX0[],int32_t vertexIndicesY0[],int32_t vertexIndicesZ0[], int32_t vertexIndicesX1[],int32_t vertexIndicesY1[],int32_t vertexIndicesZ1[]);
void generateDecimatedVerticesForSlice(VolumeSampler<uint8_t>& volIter, uint8_t uLevel, Region& regSlice, const Vector3DFloat& offset, uint8_t* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32_t vertexIndicesX[],int32_t vertexIndicesY[],int32_t vertexIndicesZ[]);
}
#endif

View File

@ -33,9 +33,9 @@ namespace PolyVox
{
void extractFastSurfaceImpl(Volume<uint8_t>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch);
uint32_t getIndex(uint32_t x, uint32_t y, uint32_t regionWidth);
uint32_t computeRoughBitmaskForSlice(VolumeIterator<uint8_t>& volIter, const Region& regSlice, const Vector3DFloat& offset, uint8_t *bitmask, uint8_t *previousBitmask);
void generateRoughIndicesForSlice(VolumeIterator<uint8_t>& volIter, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8_t* bitmask0, uint8_t* bitmask1, int32_t vertexIndicesX0[],int32_t vertexIndicesY0[],int32_t vertexIndicesZ0[], int32_t vertexIndicesX1[],int32_t vertexIndicesY1[],int32_t vertexIndicesZ1[]);
void generateRoughVerticesForSlice(VolumeIterator<uint8_t>& volIter, Region& regSlice, const Vector3DFloat& offset, uint8_t* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32_t vertexIndicesX[],int32_t vertexIndicesY[],int32_t vertexIndicesZ[]);
uint32_t computeRoughBitmaskForSlice(VolumeSampler<uint8_t>& volIter, const Region& regSlice, const Vector3DFloat& offset, uint8_t *bitmask, uint8_t *previousBitmask);
void generateRoughIndicesForSlice(VolumeSampler<uint8_t>& volIter, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8_t* bitmask0, uint8_t* bitmask1, int32_t vertexIndicesX0[],int32_t vertexIndicesY0[],int32_t vertexIndicesZ0[], int32_t vertexIndicesX1[],int32_t vertexIndicesY1[],int32_t vertexIndicesZ1[]);
void generateRoughVerticesForSlice(VolumeSampler<uint8_t>& volIter, Region& regSlice, const Vector3DFloat& offset, uint8_t* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32_t vertexIndicesX[],int32_t vertexIndicesY[],int32_t vertexIndicesZ[]);
}
#endif

View File

@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#pragma region Headers
#include "PolyVoxForwardDeclarations.h"
#include "VolumeIterator.h"
#include "VolumeSampler.h"
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxImpl/CPlusPlusZeroXSupport.h"
@ -47,19 +47,19 @@ namespace PolyVox
uint8_t m_uLodLevel;
Volume<uint8_t> m_volData;
VolumeIterator<uint8_t> m_iterVolume;
VolumeSampler<uint8_t> m_iterVolume;
uint32_t getIndex(uint32_t x, uint32_t y, uint32_t regionWidth);
void extractSurfaceForRegionLevel0(Volume<uint8_t>* volumeData, Region region, IndexedSurfacePatch* singleMaterialPatch);
uint32_t computeBitmaskForSliceLevel0(VolumeIterator<uint8_t>& volIter, const Region& regSlice, const Vector3DFloat& offset, uint8_t *bitmask, uint8_t *previousBitmask);
void generateIndicesForSliceLevel0(VolumeIterator<uint8_t>& volIter, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8_t* bitmask0, uint8_t* bitmask1, int32_t vertexIndicesX0[],int32_t vertexIndicesY0[],int32_t vertexIndicesZ0[], int32_t vertexIndicesX1[],int32_t vertexIndicesY1[],int32_t vertexIndicesZ1[]);
void generateVerticesForSliceLevel0(VolumeIterator<uint8_t>& volIter, Region& regSlice, const Vector3DFloat& offset, uint8_t* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32_t vertexIndicesX[],int32_t vertexIndicesY[],int32_t vertexIndicesZ[]);
uint32_t computeBitmaskForSliceLevel0(VolumeSampler<uint8_t>& volIter, const Region& regSlice, const Vector3DFloat& offset, uint8_t *bitmask, uint8_t *previousBitmask);
void generateIndicesForSliceLevel0(VolumeSampler<uint8_t>& volIter, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8_t* bitmask0, uint8_t* bitmask1, int32_t vertexIndicesX0[],int32_t vertexIndicesY0[],int32_t vertexIndicesZ0[], int32_t vertexIndicesX1[],int32_t vertexIndicesY1[],int32_t vertexIndicesZ1[]);
void generateVerticesForSliceLevel0(VolumeSampler<uint8_t>& volIter, Region& regSlice, const Vector3DFloat& offset, uint8_t* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32_t vertexIndicesX[],int32_t vertexIndicesY[],int32_t vertexIndicesZ[]);
void extractDecimatedSurfaceImpl(Volume<uint8_t>* volumeData, uint8_t uLevel, Region region, IndexedSurfacePatch* singleMaterialPatch);
uint32_t computeDecimatedBitmaskForSlice(VolumeIterator<uint8_t>& volIter, uint8_t uLevel, const Region& regSlice, const Vector3DFloat& offset, uint8_t *bitmask, uint8_t *previousBitmask);
void generateDecimatedIndicesForSlice(VolumeIterator<uint8_t>& volIter, uint8_t uLevel, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8_t* bitmask0, uint8_t* bitmask1, int32_t vertexIndicesX0[],int32_t vertexIndicesY0[],int32_t vertexIndicesZ0[], int32_t vertexIndicesX1[],int32_t vertexIndicesY1[],int32_t vertexIndicesZ1[]);
void generateDecimatedVerticesForSlice(VolumeIterator<uint8_t>& volIter, uint8_t uLevel, Region& regSlice, const Vector3DFloat& offset, uint8_t* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32_t vertexIndicesX[],int32_t vertexIndicesY[],int32_t vertexIndicesZ[]);
uint32_t computeDecimatedBitmaskForSlice(VolumeSampler<uint8_t>& volIter, uint8_t uLevel, const Region& regSlice, const Vector3DFloat& offset, uint8_t *bitmask, uint8_t *previousBitmask);
void generateDecimatedIndicesForSlice(VolumeSampler<uint8_t>& volIter, uint8_t uLevel, const Region& regSlice, IndexedSurfacePatch* singleMaterialPatch, const Vector3DFloat& offset, uint8_t* bitmask0, uint8_t* bitmask1, int32_t vertexIndicesX0[],int32_t vertexIndicesY0[],int32_t vertexIndicesZ0[], int32_t vertexIndicesX1[],int32_t vertexIndicesY1[],int32_t vertexIndicesZ1[]);
void generateDecimatedVerticesForSlice(VolumeSampler<uint8_t>& volIter, uint8_t uLevel, Region& regSlice, const Vector3DFloat& offset, uint8_t* bitmask, IndexedSurfacePatch* singleMaterialPatch,int32_t vertexIndicesX[],int32_t vertexIndicesY[],int32_t vertexIndicesZ[]);
};
}

View File

@ -106,8 +106,8 @@ namespace PolyVox
template <typename VoxelType>
class Volume
{
//Make VolumeIterator a friend
friend class VolumeIterator<VoxelType>;
//Make VolumeSampler a friend
friend class VolumeSampler<VoxelType>;
public:
///Constructor

View File

@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#pragma region Headers
#include "PolyVoxImpl/Block.h"
#include "Log.h"
#include "VolumeIterator.h"
#include "VolumeSampler.h"
#include "Region.h"
#include "Vector.h"

View File

@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/
#pragma endregion
#ifndef __VolumeIterator_H__
#define __VolumeIterator_H__
#ifndef __VolumeSampler_H__
#define __VolumeSampler_H__
#pragma region Headers
#include "PolyVoxForwardDeclarations.h"
@ -31,17 +31,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace PolyVox
{
template <typename VoxelType>
class VolumeIterator
class VolumeSampler
{
public:
VolumeIterator(Volume<VoxelType>& volume);
~VolumeIterator();
VolumeSampler(Volume<VoxelType>& volume);
~VolumeSampler();
bool operator==(const VolumeIterator& rhs);
bool operator<(const VolumeIterator& rhs);
bool operator>(const VolumeIterator& rhs);
bool operator<=(const VolumeIterator& rhs);
bool operator>=(const VolumeIterator& rhs);
bool operator==(const VolumeSampler& rhs);
bool operator<(const VolumeSampler& rhs);
bool operator>(const VolumeSampler& rhs);
bool operator<=(const VolumeSampler& rhs);
bool operator>=(const VolumeSampler& rhs);
uint16_t getPosX(void) const;
uint16_t getPosY(void) const;
@ -113,6 +113,6 @@ namespace PolyVox
};
}
#include "VolumeIterator.inl"
#include "VolumeSampler.inl"
#endif

View File

@ -32,20 +32,20 @@ namespace PolyVox
{
#pragma region Constructors/Destructors
template <typename VoxelType>
VolumeIterator<VoxelType>::VolumeIterator(Volume<VoxelType>& volume)
VolumeSampler<VoxelType>::VolumeSampler(Volume<VoxelType>& volume)
:mVolume(volume)
{
}
template <typename VoxelType>
VolumeIterator<VoxelType>::~VolumeIterator()
VolumeSampler<VoxelType>::~VolumeSampler()
{
}
#pragma endregion
#pragma region Operators
template <typename VoxelType>
bool VolumeIterator<VoxelType>::operator==(const VolumeIterator<VoxelType>& rhs)
bool VolumeSampler<VoxelType>::operator==(const VolumeSampler<VoxelType>& rhs)
{
//We could just check whether the two mCurrentVoxel pointers are equal, but this may not
//be safe in the future if we decide to allow blocks to be shared between volumes
@ -62,7 +62,7 @@ namespace PolyVox
}
template <typename VoxelType>
bool VolumeIterator<VoxelType>::operator<(const VolumeIterator<VoxelType>& rhs)
bool VolumeSampler<VoxelType>::operator<(const VolumeSampler<VoxelType>& rhs)
{
assert(&mVolume == &rhs.mVolume);
@ -85,21 +85,21 @@ namespace PolyVox
}
template <typename VoxelType>
bool VolumeIterator<VoxelType>::operator>(const VolumeIterator<VoxelType>& rhs)
bool VolumeSampler<VoxelType>::operator>(const VolumeSampler<VoxelType>& rhs)
{
assert(&mVolume == &rhs.mVolume);
return (rhs < *this);
}
template <typename VoxelType>
bool VolumeIterator<VoxelType>::operator<=(const VolumeIterator<VoxelType>& rhs)
bool VolumeSampler<VoxelType>::operator<=(const VolumeSampler<VoxelType>& rhs)
{
assert(&mVolume == &rhs.mVolume);
return (rhs > *this);
}
template <typename VoxelType>
bool VolumeIterator<VoxelType>::operator>=(const VolumeIterator<VoxelType>& rhs)
bool VolumeSampler<VoxelType>::operator>=(const VolumeSampler<VoxelType>& rhs)
{
assert(&mVolume == &rhs.mVolume);
return (rhs < *this);
@ -108,25 +108,25 @@ namespace PolyVox
#pragma region Getters
template <typename VoxelType>
uint16_t VolumeIterator<VoxelType>::getPosX(void) const
uint16_t VolumeSampler<VoxelType>::getPosX(void) const
{
return mXPosInVolume;
}
template <typename VoxelType>
uint16_t VolumeIterator<VoxelType>::getPosY(void) const
uint16_t VolumeSampler<VoxelType>::getPosY(void) const
{
return mYPosInVolume;
}
template <typename VoxelType>
uint16_t VolumeIterator<VoxelType>::getPosZ(void) const
uint16_t VolumeSampler<VoxelType>::getPosZ(void) const
{
return mZPosInVolume;
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::getSubSampledVoxel(uint8_t uLevel) const
VoxelType VolumeSampler<VoxelType>::getSubSampledVoxel(uint8_t uLevel) const
{
if(uLevel == 0)
{
@ -164,7 +164,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::getSubSampledVoxelWithBoundsCheck(uint8_t uLevel) const
VoxelType VolumeSampler<VoxelType>::getSubSampledVoxelWithBoundsCheck(uint8_t uLevel) const
{
const uint8_t uSize = 1 << uLevel;
@ -183,13 +183,13 @@ namespace PolyVox
}
template <typename VoxelType>
const Volume<VoxelType>& VolumeIterator<VoxelType>::getVolume(void) const
const Volume<VoxelType>& VolumeSampler<VoxelType>::getVolume(void) const
{
return mVolume;
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::getVoxel(void) const
VoxelType VolumeSampler<VoxelType>::getVoxel(void) const
{
return *mCurrentVoxel;
}
@ -197,13 +197,13 @@ namespace PolyVox
#pragma region Setters
template <typename VoxelType>
void VolumeIterator<VoxelType>::setPosition(const Vector3DInt16& v3dNewPos)
void VolumeSampler<VoxelType>::setPosition(const Vector3DInt16& v3dNewPos)
{
setPosition(v3dNewPos.getX(), v3dNewPos.getY(), v3dNewPos.getZ());
}
template <typename VoxelType>
void VolumeIterator<VoxelType>::setPosition(uint16_t xPos, uint16_t yPos, uint16_t zPos)
void VolumeSampler<VoxelType>::setPosition(uint16_t xPos, uint16_t yPos, uint16_t zPos)
{
mXPosInVolume = xPos;
mYPosInVolume = yPos;
@ -232,7 +232,7 @@ namespace PolyVox
#pragma region Other
template <typename VoxelType>
void VolumeIterator<VoxelType>::movePositiveX(void)
void VolumeSampler<VoxelType>::movePositiveX(void)
{
++mXPosInVolume;
if(mXPosInVolume % mVolume.m_uBlockSideLength == 0)
@ -251,7 +251,7 @@ namespace PolyVox
#pragma region Peekers
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1nx1ny1nz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1nx1ny1nz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != 0) && (mYPosInVolume%mVolume.m_uBlockSideLength != 0) && (mZPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -261,7 +261,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1nx1ny0pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1nx1ny0pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != 0) && (mYPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -271,7 +271,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1nx1ny1pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1nx1ny1pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != 0) && (mYPosInVolume%mVolume.m_uBlockSideLength != 0) && (mZPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -281,7 +281,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1nx0py1nz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1nx0py1nz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != 0) && (mZPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -291,7 +291,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1nx0py0pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1nx0py0pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -301,7 +301,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1nx0py1pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1nx0py1pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != 0) && (mZPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -311,7 +311,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1nx1py1nz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1nx1py1nz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != 0) && (mYPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mZPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -321,7 +321,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1nx1py0pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1nx1py0pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != 0) && (mYPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -331,7 +331,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1nx1py1pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1nx1py1pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != 0) && (mYPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mZPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -343,7 +343,7 @@ namespace PolyVox
//////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel0px1ny1nz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel0px1ny1nz(void) const
{
if((mYPosInVolume%mVolume.m_uBlockSideLength != 0) && (mZPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -353,7 +353,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel0px1ny0pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel0px1ny0pz(void) const
{
if((mYPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -363,7 +363,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel0px1ny1pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel0px1ny1pz(void) const
{
if((mYPosInVolume%mVolume.m_uBlockSideLength != 0) && (mZPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -373,7 +373,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel0px0py1nz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel0px0py1nz(void) const
{
if((mZPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -383,13 +383,13 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel0px0py0pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel0px0py0pz(void) const
{
return *mCurrentVoxel;
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel0px0py1pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel0px0py1pz(void) const
{
if((mZPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -399,7 +399,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel0px1py1nz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel0px1py1nz(void) const
{
if((mYPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mZPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -409,7 +409,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel0px1py0pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel0px1py0pz(void) const
{
if((mYPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -419,7 +419,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel0px1py1pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel0px1py1pz(void) const
{
if((mYPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mZPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -431,7 +431,7 @@ namespace PolyVox
//////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1px1ny1nz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1px1ny1nz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mYPosInVolume%mVolume.m_uBlockSideLength != 0) && (mZPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -441,7 +441,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1px1ny0pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1px1ny0pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mYPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -451,7 +451,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1px1ny1pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1px1ny1pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mYPosInVolume%mVolume.m_uBlockSideLength != 0) && (mZPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -461,7 +461,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1px0py1nz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1px0py1nz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mZPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -471,7 +471,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1px0py0pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1px0py0pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -481,7 +481,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1px0py1pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1px0py1pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mZPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -491,7 +491,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1px1py1nz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1px1py1nz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mYPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mZPosInVolume%mVolume.m_uBlockSideLength != 0))
{
@ -501,7 +501,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1px1py0pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1px1py0pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mYPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{
@ -511,7 +511,7 @@ namespace PolyVox
}
template <typename VoxelType>
VoxelType VolumeIterator<VoxelType>::peekVoxel1px1py1pz(void) const
VoxelType VolumeSampler<VoxelType>::peekVoxel1px1py1pz(void) const
{
if((mXPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mYPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1) && (mZPosInVolume%mVolume.m_uBlockSideLength != mVolume.m_uBlockSideLength-1))
{

View File

@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace PolyVox
{
float computeSmoothedVoxel(VolumeIterator<uint8_t>& volIter);
float computeSmoothedVoxel(VolumeSampler<uint8_t>& volIter);
}
#endif