diff --git a/library/PolyVoxCore/include/AmbientOcclusionCalculator.h b/library/PolyVoxCore/include/AmbientOcclusionCalculator.h index 97120601..81a6aa71 100644 --- a/library/PolyVoxCore/include/AmbientOcclusionCalculator.h +++ b/library/PolyVoxCore/include/AmbientOcclusionCalculator.h @@ -39,7 +39,7 @@ namespace PolyVox private: Region m_region; - Volume::VolumeSampler m_sampVolume; + Volume::Sampler m_sampVolume; Volume* m_volInput; Array<3, uint8_t>* m_arrayResult; float m_fRayLength; diff --git a/library/PolyVoxCore/include/CubicSurfaceExtractor.h b/library/PolyVoxCore/include/CubicSurfaceExtractor.h index b3963dcf..43d8c1d8 100644 --- a/library/PolyVoxCore/include/CubicSurfaceExtractor.h +++ b/library/PolyVoxCore/include/CubicSurfaceExtractor.h @@ -50,7 +50,7 @@ namespace PolyVox private: //The volume data and a sampler to access it. Volume* m_volData; - Volume::VolumeSampler m_sampVolume; + Volume::Sampler m_sampVolume; //Information about the region we are currently processing Region m_regSizeInVoxels; diff --git a/library/PolyVoxCore/include/CubicSurfaceExtractorWithNormals.h b/library/PolyVoxCore/include/CubicSurfaceExtractorWithNormals.h index 67d6f466..704645b9 100644 --- a/library/PolyVoxCore/include/CubicSurfaceExtractorWithNormals.h +++ b/library/PolyVoxCore/include/CubicSurfaceExtractorWithNormals.h @@ -42,7 +42,7 @@ namespace PolyVox private: //The volume data and a sampler to access it. Volume* m_volData; - typename Volume::VolumeSampler m_sampVolume; + typename Volume::Sampler m_sampVolume; //The surface patch we are currently filling. SurfaceMesh* m_meshCurrent; diff --git a/library/PolyVoxCore/include/GradientEstimators.h b/library/PolyVoxCore/include/GradientEstimators.h index 0b5c8784..36cf5e03 100644 --- a/library/PolyVoxCore/include/GradientEstimators.h +++ b/library/PolyVoxCore/include/GradientEstimators.h @@ -42,18 +42,18 @@ namespace PolyVox }; template - Vector3DFloat computeCentralDifferenceGradient(const typename Volume::VolumeSampler& volIter); + Vector3DFloat computeCentralDifferenceGradient(const typename Volume::Sampler& volIter); template - Vector3DFloat computeSmoothCentralDifferenceGradient(typename Volume::VolumeSampler& volIter); + Vector3DFloat computeSmoothCentralDifferenceGradient(typename Volume::Sampler& volIter); template - Vector3DFloat computeDecimatedCentralDifferenceGradient(typename Volume::VolumeSampler& volIter); + Vector3DFloat computeDecimatedCentralDifferenceGradient(typename Volume::Sampler& volIter); template - Vector3DFloat computeSobelGradient(const typename Volume::VolumeSampler& volIter); + Vector3DFloat computeSobelGradient(const typename Volume::Sampler& volIter); template - Vector3DFloat computeSmoothSobelGradient(typename Volume::VolumeSampler& volIter); + Vector3DFloat computeSmoothSobelGradient(typename Volume::Sampler& volIter); POLYVOX_API void computeNormalsForVertices(Volume* volumeData, SurfaceMesh& mesh, NormalGenerationMethod normalGenerationMethod); POLYVOX_API Vector3DFloat computeNormal(Volume* volumeData, const Vector3DFloat& v3dPos, NormalGenerationMethod normalGenerationMethod); diff --git a/library/PolyVoxCore/include/GradientEstimators.inl b/library/PolyVoxCore/include/GradientEstimators.inl index cbc019f7..d0dbb16c 100644 --- a/library/PolyVoxCore/include/GradientEstimators.inl +++ b/library/PolyVoxCore/include/GradientEstimators.inl @@ -28,7 +28,7 @@ freely, subject to the following restrictions: namespace PolyVox { template - Vector3DFloat computeCentralDifferenceGradient(const typename Volume::VolumeSampler& volIter) + Vector3DFloat computeCentralDifferenceGradient(const typename Volume::Sampler& volIter) { //FIXME - bitwise way of doing this? VoxelType voxel1nx = volIter.peekVoxel1nx0py0pz() > 0 ? 1: 0; @@ -49,7 +49,7 @@ namespace PolyVox } template - Vector3DFloat computeDecimatedCentralDifferenceGradient(const typename Volume::VolumeSampler& volIter) + Vector3DFloat computeDecimatedCentralDifferenceGradient(const typename Volume::Sampler& volIter) { const int32_t x = volIter.getPosX(); const int32_t y = volIter.getPosY(); @@ -74,7 +74,7 @@ namespace PolyVox } template - Vector3DFloat computeSmoothCentralDifferenceGradient(typename Volume::VolumeSampler& volIter) + Vector3DFloat computeSmoothCentralDifferenceGradient(typename Volume::Sampler& volIter) { int32_t initialX = volIter.getPosX(); int32_t initialY = volIter.getPosY(); @@ -105,7 +105,7 @@ namespace PolyVox } template - Vector3DFloat computeSobelGradient(const typename Volume::VolumeSampler& volIter) + Vector3DFloat computeSobelGradient(const typename Volume::Sampler& 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} } }; @@ -188,7 +188,7 @@ namespace PolyVox } template - Vector3DFloat computeSmoothSobelGradient(typename Volume::VolumeSampler& volIter) + Vector3DFloat computeSmoothSobelGradient(typename Volume::Sampler& 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} } }; diff --git a/library/PolyVoxCore/include/PolyVoxForwardDeclarations.h b/library/PolyVoxCore/include/PolyVoxForwardDeclarations.h index 40b7a9bf..c98d32de 100644 --- a/library/PolyVoxCore/include/PolyVoxForwardDeclarations.h +++ b/library/PolyVoxCore/include/PolyVoxForwardDeclarations.h @@ -99,7 +99,7 @@ namespace PolyVox typedef Vector<3,uint32_t> Vector3DUint32; //---------------------------- - //template class VolumeSampler; + //template class Sampler; } #endif diff --git a/library/PolyVoxCore/include/PolyVoxImpl/Block.h b/library/PolyVoxCore/include/PolyVoxImpl/Block.h index aea98952..72a6ac72 100644 --- a/library/PolyVoxCore/include/PolyVoxImpl/Block.h +++ b/library/PolyVoxCore/include/PolyVoxImpl/Block.h @@ -44,8 +44,8 @@ namespace PolyVox static uint32_t maxRunlength(void) {return (std::numeric_limits::max)();} }; - //Make VolumeSampler a friend - friend class Volume::VolumeSampler; + //Make Sampler a friend + friend class Volume::Sampler; public: Block(uint16_t uSideLength = 0); diff --git a/library/PolyVoxCore/include/Raycast.h b/library/PolyVoxCore/include/Raycast.h index 6465a38f..5abea58f 100644 --- a/library/PolyVoxCore/include/Raycast.h +++ b/library/PolyVoxCore/include/Raycast.h @@ -101,7 +101,7 @@ namespace PolyVox void doRaycast(float x1, float y1, float z1, float x2, float y2, float z2); Volume* m_volData; - Volume::VolumeSampler m_sampVolume; + Volume::Sampler m_sampVolume; Vector3DFloat m_v3dStart; Vector3DFloat m_v3dDirection; diff --git a/library/PolyVoxCore/include/RaycastWithCallback.h b/library/PolyVoxCore/include/RaycastWithCallback.h index 522e001f..3d617799 100644 --- a/library/PolyVoxCore/include/RaycastWithCallback.h +++ b/library/PolyVoxCore/include/RaycastWithCallback.h @@ -47,7 +47,7 @@ namespace PolyVox void doRaycast(float x1, float y1, float z1, float x2, float y2, float z2); Volume* m_volData; - Volume::VolumeSampler m_sampVolume; + Volume::Sampler m_sampVolume; Vector3DFloat m_v3dStart; Vector3DFloat m_v3dDirection; diff --git a/library/PolyVoxCore/include/SurfaceExtractor.h b/library/PolyVoxCore/include/SurfaceExtractor.h index 8efff6c4..560b6316 100644 --- a/library/PolyVoxCore/include/SurfaceExtractor.h +++ b/library/PolyVoxCore/include/SurfaceExtractor.h @@ -54,8 +54,8 @@ namespace PolyVox Array2DInt32& m_pCurrentVertexIndicesY, Array2DInt32& m_pCurrentVertexIndicesZ); - Vector3DFloat computeCentralDifferenceGradient(const typename Volume::VolumeSampler& volIter); - Vector3DFloat computeSobelGradient(const typename Volume::VolumeSampler& volIter); + Vector3DFloat computeCentralDifferenceGradient(const typename Volume::Sampler& volIter); + Vector3DFloat computeSobelGradient(const typename Volume::Sampler& volIter); //Use the cell bitmasks to generate all the indices needed for that slice void generateIndicesForSlice(const Array2DUint8& pPreviousBitmask, @@ -68,7 +68,7 @@ namespace PolyVox //The volume data and a sampler to access it. Volume* m_volData; - typename Volume::VolumeSampler m_sampVolume; + typename Volume::Sampler m_sampVolume; //Holds a position in volume space. int32_t iXVolSpace; diff --git a/library/PolyVoxCore/include/SurfaceExtractor.inl b/library/PolyVoxCore/include/SurfaceExtractor.inl index bd26c57a..7f9bff5a 100644 --- a/library/PolyVoxCore/include/SurfaceExtractor.inl +++ b/library/PolyVoxCore/include/SurfaceExtractor.inl @@ -507,7 +507,7 @@ namespace PolyVox } template - Vector3DFloat SurfaceExtractor::computeCentralDifferenceGradient(const typename Volume::VolumeSampler& volIter) + Vector3DFloat SurfaceExtractor::computeCentralDifferenceGradient(const typename Volume::Sampler& volIter) { uint8_t voxel1nx = volIter.peekVoxel1nx0py0pz().getDensity(); uint8_t voxel1px = volIter.peekVoxel1px0py0pz().getDensity(); @@ -527,7 +527,7 @@ namespace PolyVox } template - Vector3DFloat SurfaceExtractor::computeSobelGradient(const typename Volume::VolumeSampler& volIter) + Vector3DFloat SurfaceExtractor::computeSobelGradient(const typename Volume::Sampler& 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} } }; diff --git a/library/PolyVoxCore/include/Volume.h b/library/PolyVoxCore/include/Volume.h index 148cbb94..e2183b68 100644 --- a/library/PolyVoxCore/include/Volume.h +++ b/library/PolyVoxCore/include/Volume.h @@ -61,7 +61,7 @@ namespace PolyVox /// border value (see getBorderValue() and setBorderValue()). PolyVox also has support for near infinite volumes which will be discussed later. /// /// Access to individual voxels is provided via the setVoxelAt() and getVoxelAt() member functions. Advanced users may also be interested in - /// the VolumeSampler class for faster read-only access to a large number of voxels. + /// the Sampler class for faster read-only access to a large number of voxels. /// /// Lastly the example prints out some properties of the Volume. Note that the dimentsions getWidth(), getHeight(), and getDepth() are inclusive, such /// that the width is 64 when the range of valid x coordinates goes from 0 to 63. @@ -144,13 +144,13 @@ namespace PolyVox class Volume { public: - class VolumeSampler + class Sampler { public: - VolumeSampler(Volume* volume); - ~VolumeSampler(); + Sampler(Volume* volume); + ~Sampler(); - typename VolumeSampler& operator=(const typename VolumeSampler& rhs) throw(); + typename Sampler& operator=(const typename Sampler& rhs) throw(); int32_t getPosX(void) const; int32_t getPosY(void) const; diff --git a/library/PolyVoxCore/include/VolumeSampler.inl b/library/PolyVoxCore/include/VolumeSampler.inl index dcd9d069..81750a4d 100644 --- a/library/PolyVoxCore/include/VolumeSampler.inl +++ b/library/PolyVoxCore/include/VolumeSampler.inl @@ -35,18 +35,18 @@ freely, subject to the following restrictions: namespace PolyVox { template - Volume::VolumeSampler::VolumeSampler(Volume* volume) + Volume::Sampler::Sampler(Volume* volume) :mVolume(volume) { } template - Volume::VolumeSampler::~VolumeSampler() + Volume::Sampler::~Sampler() { } template - typename Volume::VolumeSampler& Volume::VolumeSampler::operator=(const typename Volume::VolumeSampler& rhs) throw() + typename Volume::Sampler& Volume::Sampler::operator=(const typename Volume::Sampler& rhs) throw() { if(this == &rhs) { @@ -61,25 +61,25 @@ namespace PolyVox } template - int32_t Volume::VolumeSampler::getPosX(void) const + int32_t Volume::Sampler::getPosX(void) const { return mXPosInVolume; } template - int32_t Volume::VolumeSampler::getPosY(void) const + int32_t Volume::Sampler::getPosY(void) const { return mYPosInVolume; } template - int32_t Volume::VolumeSampler::getPosZ(void) const + int32_t Volume::Sampler::getPosZ(void) const { return mZPosInVolume; } template - VoxelType Volume::VolumeSampler::getSubSampledVoxel(uint8_t uLevel) const + VoxelType Volume::Sampler::getSubSampledVoxel(uint8_t uLevel) const { if(uLevel == 0) { @@ -117,25 +117,25 @@ namespace PolyVox } template - const Volume* Volume::VolumeSampler::getVolume(void) const + const Volume* Volume::Sampler::getVolume(void) const { return mVolume; } template - VoxelType Volume::VolumeSampler::getVoxel(void) const + VoxelType Volume::Sampler::getVoxel(void) const { return *mCurrentVoxel; } template - void Volume::VolumeSampler::setPosition(const Vector3DInt32& v3dNewPos) + void Volume::Sampler::setPosition(const Vector3DInt32& v3dNewPos) { setPosition(v3dNewPos.getX(), v3dNewPos.getY(), v3dNewPos.getZ()); } template - void Volume::VolumeSampler::setPosition(int32_t xPos, int32_t yPos, int32_t zPos) + void Volume::Sampler::setPosition(int32_t xPos, int32_t yPos, int32_t zPos) { mXPosInVolume = xPos; mYPosInVolume = yPos; @@ -166,7 +166,7 @@ namespace PolyVox } template - void Volume::VolumeSampler::movePositiveX(void) + void Volume::Sampler::movePositiveX(void) { //Note the *pre* increament here if((++mXPosInVolume) % mVolume->m_uBlockSideLength != 0) @@ -182,7 +182,7 @@ namespace PolyVox } template - void Volume::VolumeSampler::movePositiveY(void) + void Volume::Sampler::movePositiveY(void) { //Note the *pre* increament here if((++mYPosInVolume) % mVolume->m_uBlockSideLength != 0) @@ -198,7 +198,7 @@ namespace PolyVox } template - void Volume::VolumeSampler::movePositiveZ(void) + void Volume::Sampler::movePositiveZ(void) { //Note the *pre* increament here if((++mZPosInVolume) % mVolume->m_uBlockSideLength != 0) @@ -214,7 +214,7 @@ namespace PolyVox } template - void Volume::VolumeSampler::moveNegativeX(void) + void Volume::Sampler::moveNegativeX(void) { //Note the *post* decreament here if((mXPosInVolume--) % mVolume->m_uBlockSideLength != 0) @@ -230,7 +230,7 @@ namespace PolyVox } template - void Volume::VolumeSampler::moveNegativeY(void) + void Volume::Sampler::moveNegativeY(void) { //Note the *post* decreament here if((mYPosInVolume--) % mVolume->m_uBlockSideLength != 0) @@ -246,7 +246,7 @@ namespace PolyVox } template - void Volume::VolumeSampler::moveNegativeZ(void) + void Volume::Sampler::moveNegativeZ(void) { //Note the *post* decreament here if((mZPosInVolume--) % mVolume->m_uBlockSideLength != 0) @@ -262,7 +262,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1nx1ny1nz(void) const + VoxelType Volume::Sampler::peekVoxel1nx1ny1nz(void) const { if( BORDER_LOW(mXPosInVolume) && BORDER_LOW(mYPosInVolume) && BORDER_LOW(mZPosInVolume) ) { @@ -272,7 +272,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1nx1ny0pz(void) const + VoxelType Volume::Sampler::peekVoxel1nx1ny0pz(void) const { if( BORDER_LOW(mXPosInVolume) && BORDER_LOW(mYPosInVolume) ) { @@ -282,7 +282,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1nx1ny1pz(void) const + VoxelType Volume::Sampler::peekVoxel1nx1ny1pz(void) const { if( BORDER_LOW(mXPosInVolume) && BORDER_LOW(mYPosInVolume) && BORDER_HIGH(mZPosInVolume) ) { @@ -292,7 +292,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1nx0py1nz(void) const + VoxelType Volume::Sampler::peekVoxel1nx0py1nz(void) const { if( BORDER_LOW(mXPosInVolume) && BORDER_LOW(mZPosInVolume) ) { @@ -302,7 +302,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1nx0py0pz(void) const + VoxelType Volume::Sampler::peekVoxel1nx0py0pz(void) const { if( BORDER_LOW(mXPosInVolume) ) { @@ -312,7 +312,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1nx0py1pz(void) const + VoxelType Volume::Sampler::peekVoxel1nx0py1pz(void) const { if( BORDER_LOW(mXPosInVolume) && BORDER_HIGH(mZPosInVolume) ) { @@ -322,7 +322,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1nx1py1nz(void) const + VoxelType Volume::Sampler::peekVoxel1nx1py1nz(void) const { if( BORDER_LOW(mXPosInVolume) && BORDER_HIGH(mYPosInVolume) && BORDER_LOW(mYPosInVolume) ) { @@ -332,7 +332,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1nx1py0pz(void) const + VoxelType Volume::Sampler::peekVoxel1nx1py0pz(void) const { if( BORDER_LOW(mXPosInVolume) && BORDER_HIGH(mYPosInVolume) ) { @@ -342,7 +342,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1nx1py1pz(void) const + VoxelType Volume::Sampler::peekVoxel1nx1py1pz(void) const { if( BORDER_LOW(mXPosInVolume) && BORDER_HIGH(mYPosInVolume) && BORDER_HIGH(mZPosInVolume) ) { @@ -354,7 +354,7 @@ namespace PolyVox ////////////////////////////////////////////////////////////////////////// template - VoxelType Volume::VolumeSampler::peekVoxel0px1ny1nz(void) const + VoxelType Volume::Sampler::peekVoxel0px1ny1nz(void) const { if( BORDER_LOW(mYPosInVolume) && BORDER_LOW(mZPosInVolume) ) { @@ -364,7 +364,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel0px1ny0pz(void) const + VoxelType Volume::Sampler::peekVoxel0px1ny0pz(void) const { if( BORDER_LOW(mYPosInVolume) ) { @@ -374,7 +374,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel0px1ny1pz(void) const + VoxelType Volume::Sampler::peekVoxel0px1ny1pz(void) const { if( BORDER_LOW(mYPosInVolume) && BORDER_HIGH(mZPosInVolume) ) { @@ -384,7 +384,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel0px0py1nz(void) const + VoxelType Volume::Sampler::peekVoxel0px0py1nz(void) const { if( BORDER_LOW(mZPosInVolume) ) { @@ -394,13 +394,13 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel0px0py0pz(void) const + VoxelType Volume::Sampler::peekVoxel0px0py0pz(void) const { return *mCurrentVoxel; } template - VoxelType Volume::VolumeSampler::peekVoxel0px0py1pz(void) const + VoxelType Volume::Sampler::peekVoxel0px0py1pz(void) const { if( BORDER_HIGH(mZPosInVolume) ) { @@ -410,7 +410,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel0px1py1nz(void) const + VoxelType Volume::Sampler::peekVoxel0px1py1nz(void) const { if( BORDER_HIGH(mYPosInVolume) && BORDER_LOW(mZPosInVolume) ) { @@ -420,7 +420,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel0px1py0pz(void) const + VoxelType Volume::Sampler::peekVoxel0px1py0pz(void) const { if( BORDER_HIGH(mYPosInVolume) ) { @@ -430,7 +430,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel0px1py1pz(void) const + VoxelType Volume::Sampler::peekVoxel0px1py1pz(void) const { if( BORDER_HIGH(mYPosInVolume) && BORDER_HIGH(mZPosInVolume) ) { @@ -442,7 +442,7 @@ namespace PolyVox ////////////////////////////////////////////////////////////////////////// template - VoxelType Volume::VolumeSampler::peekVoxel1px1ny1nz(void) const + VoxelType Volume::Sampler::peekVoxel1px1ny1nz(void) const { if( BORDER_HIGH(mXPosInVolume) && BORDER_LOW(mYPosInVolume) && BORDER_LOW(mZPosInVolume) ) { @@ -452,7 +452,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1px1ny0pz(void) const + VoxelType Volume::Sampler::peekVoxel1px1ny0pz(void) const { if( BORDER_HIGH(mXPosInVolume) && BORDER_LOW(mYPosInVolume) ) { @@ -462,7 +462,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1px1ny1pz(void) const + VoxelType Volume::Sampler::peekVoxel1px1ny1pz(void) const { if( BORDER_HIGH(mXPosInVolume) && BORDER_LOW(mYPosInVolume) && BORDER_HIGH(mZPosInVolume) ) { @@ -472,7 +472,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1px0py1nz(void) const + VoxelType Volume::Sampler::peekVoxel1px0py1nz(void) const { if( BORDER_HIGH(mXPosInVolume) && BORDER_LOW(mZPosInVolume) ) { @@ -482,7 +482,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1px0py0pz(void) const + VoxelType Volume::Sampler::peekVoxel1px0py0pz(void) const { if( BORDER_HIGH(mXPosInVolume) ) { @@ -492,7 +492,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1px0py1pz(void) const + VoxelType Volume::Sampler::peekVoxel1px0py1pz(void) const { if( BORDER_HIGH(mXPosInVolume) && BORDER_HIGH(mZPosInVolume) ) { @@ -502,7 +502,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1px1py1nz(void) const + VoxelType Volume::Sampler::peekVoxel1px1py1nz(void) const { if( BORDER_HIGH(mXPosInVolume) && BORDER_HIGH(mYPosInVolume) && BORDER_LOW(mZPosInVolume) ) { @@ -512,7 +512,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1px1py0pz(void) const + VoxelType Volume::Sampler::peekVoxel1px1py0pz(void) const { if( BORDER_HIGH(mXPosInVolume) && BORDER_HIGH(mYPosInVolume) ) { @@ -522,7 +522,7 @@ namespace PolyVox } template - VoxelType Volume::VolumeSampler::peekVoxel1px1py1pz(void) const + VoxelType Volume::Sampler::peekVoxel1px1py1pz(void) const { if( BORDER_HIGH(mXPosInVolume) && BORDER_HIGH(mYPosInVolume) && BORDER_HIGH(mZPosInVolume) ) { diff --git a/library/PolyVoxCore/include/VoxelFilters.h b/library/PolyVoxCore/include/VoxelFilters.h index cb1f884a..c518cce7 100644 --- a/library/PolyVoxCore/include/VoxelFilters.h +++ b/library/PolyVoxCore/include/VoxelFilters.h @@ -31,7 +31,7 @@ freely, subject to the following restrictions: namespace PolyVox { - float computeSmoothedVoxel(Volume::VolumeSampler& volIter); + float computeSmoothedVoxel(Volume::Sampler& volIter); } #endif \ No newline at end of file diff --git a/library/PolyVoxCore/source/GradientEstimators.cpp b/library/PolyVoxCore/source/GradientEstimators.cpp index 53c3497b..3fb786f9 100644 --- a/library/PolyVoxCore/source/GradientEstimators.cpp +++ b/library/PolyVoxCore/source/GradientEstimators.cpp @@ -41,7 +41,7 @@ namespace PolyVox const Vector3DFloat& v3dPos = iterSurfaceVertex->getPosition() + static_cast(mesh.m_Region.getLowerCorner()); const Vector3DInt32 v3dFloor = static_cast(v3dPos); - Volume::VolumeSampler volIter(volumeData); + Volume::Sampler volIter(volumeData); //Check all corners are within the volume, allowing a boundary for gradient estimation bool lowerCornerInside = volumeData->getEnclosingRegion().containsPoint(v3dFloor,2); @@ -67,7 +67,7 @@ namespace PolyVox { Vector3DFloat v3dGradient; //To store the result - Volume::VolumeSampler volIter(volumeData); + Volume::Sampler volIter(volumeData); const Vector3DInt32 v3dFloor = static_cast(v3dPos); diff --git a/library/PolyVoxCore/source/VoxelFilters.cpp b/library/PolyVoxCore/source/VoxelFilters.cpp index 720ff950..66de7fab 100644 --- a/library/PolyVoxCore/source/VoxelFilters.cpp +++ b/library/PolyVoxCore/source/VoxelFilters.cpp @@ -25,7 +25,7 @@ freely, subject to the following restrictions: namespace PolyVox { - float computeSmoothedVoxel(Volume::VolumeSampler& volIter) + float computeSmoothedVoxel(Volume::Sampler& volIter) { assert(volIter.getPosX() >= 1); assert(volIter.getPosY() >= 1); diff --git a/library/PolyVoxUtil/include/Serialization.inl b/library/PolyVoxUtil/include/Serialization.inl index 13a4a361..8f503ad0 100644 --- a/library/PolyVoxUtil/include/Serialization.inl +++ b/library/PolyVoxUtil/include/Serialization.inl @@ -98,7 +98,7 @@ namespace PolyVox stream.write(reinterpret_cast(&volumeDepthPower), sizeof(volumeDepthPower)); //Write data - Volume::VolumeSampler volIter(&volume); + Volume::Sampler volIter(&volume); for(uint16_t z = 0; z < volumeDepth; ++z) { //Update progress once per slice. @@ -212,7 +212,7 @@ namespace PolyVox stream.write(reinterpret_cast(&volumeDepthPower), sizeof(volumeDepthPower)); //Write data - Volume::VolumeSampler volIter(&volume); + Volume::Sampler volIter(&volume); VoxelType current; uint32_t runLength = 0; bool firstTime = true; @@ -380,7 +380,7 @@ namespace PolyVox stream.write(reinterpret_cast(&volumeDepth), sizeof(volumeDepth)); //Write data - Volume::VolumeSampler volIter(&volume); + Volume::Sampler volIter(&volume); VoxelType current; uint32_t runLength = 0; bool firstTime = true; diff --git a/library/PolyVoxUtil/include/VolumeChangeTracker.inl b/library/PolyVoxUtil/include/VolumeChangeTracker.inl index fb48d627..8a8a897f 100644 --- a/library/PolyVoxUtil/include/VolumeChangeTracker.inl +++ b/library/PolyVoxUtil/include/VolumeChangeTracker.inl @@ -149,7 +149,7 @@ namespace PolyVox assert(m_bIsLocked); //FIXME - rather than creating a iterator each time we should have one stored - /*VolumeSampler iterVol(*volumeData); + /*Sampler iterVol(*volumeData); iterVol.setPosition(x,y,z); iterVol.setVoxel(value);*/ volumeData->setVoxelAt(x,y,z,value);