From fcf5b2b055472488a67ce355b8a0c018d1c28626 Mon Sep 17 00:00:00 2001 From: David Williams Date: Fri, 9 Aug 2013 20:32:20 +0200 Subject: [PATCH] Making Cubiquity version of PolyVox more closely match develop version. --- .../PolyVoxCore/CubicSurfaceExtractor.h | 1 + .../CubicSurfaceExtractorWithNormals.inl | 12 +- .../include/PolyVoxCore/DefaultIsQuadNeeded.h | 4 +- .../PolyVoxCore/Impl/CompilerCapabilities.h | 2 +- .../include/PolyVoxCore/Impl/Utility.h | 2 - .../MarchingCubesSurfaceExtractor.inl | 5 +- .../PolyVoxCore/include/PolyVoxCore/Region.h | 10 +- .../include/PolyVoxCore/SurfaceMesh.h | 4 +- .../include/PolyVoxCore/SurfaceMesh.inl | 4 +- .../include/PolyVoxCore/VolumeResampler.h | 4 - .../include/PolyVoxCore/VolumeResampler.inl | 145 +----------------- library/PolyVoxCore/source/Impl/Utility.cpp | 5 - library/PolyVoxCore/source/Region.cpp | 10 +- 13 files changed, 28 insertions(+), 180 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractor.h b/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractor.h index 73477153..86e04020 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractor.h +++ b/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractor.h @@ -118,6 +118,7 @@ namespace PolyVox CubicSurfaceExtractor(VolumeType* volData, Region region, SurfaceMesh >* result, WrapMode eWrapMode = WrapModes::Border, typename VolumeType::VoxelType tBorderValue = typename VolumeType::VoxelType(), bool bMergeQuads = true, IsQuadNeeded isQuadNeeded = IsQuadNeeded()); #endif + void execute(); private: diff --git a/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.inl b/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.inl index 11b2ca9b..df347b32 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.inl @@ -43,16 +43,16 @@ namespace PolyVox Timer timer; m_meshCurrent->clear(); - for(int32_t z = m_regSizeInVoxels.getLowerCorner().getZ(); z < m_regSizeInVoxels.getUpperCorner().getZ(); z++) + for(int32_t z = m_regSizeInVoxels.getLowerZ(); z < m_regSizeInVoxels.getUpperZ(); z++) { - for(int32_t y = m_regSizeInVoxels.getLowerCorner().getY(); y < m_regSizeInVoxels.getUpperCorner().getY(); y++) + for(int32_t y = m_regSizeInVoxels.getLowerY(); y < m_regSizeInVoxels.getUpperY(); y++) { - for(int32_t x = m_regSizeInVoxels.getLowerCorner().getX(); x < m_regSizeInVoxels.getUpperCorner().getX(); x++) + for(int32_t x = m_regSizeInVoxels.getLowerX(); x < m_regSizeInVoxels.getUpperX(); x++) { // these are always positive anyway - float regX = static_cast(x - m_regSizeInVoxels.getLowerCorner().getX()); - float regY = static_cast(y - m_regSizeInVoxels.getLowerCorner().getY()); - float regZ = static_cast(z - m_regSizeInVoxels.getLowerCorner().getZ()); + float regX = static_cast(x - m_regSizeInVoxels.getLowerX()); + float regY = static_cast(y - m_regSizeInVoxels.getLowerY()); + float regZ = static_cast(z - m_regSizeInVoxels.getLowerZ()); uint32_t material = 0; diff --git a/library/PolyVoxCore/include/PolyVoxCore/DefaultIsQuadNeeded.h b/library/PolyVoxCore/include/PolyVoxCore/DefaultIsQuadNeeded.h index ea6cf673..ce011036 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/DefaultIsQuadNeeded.h +++ b/library/PolyVoxCore/include/PolyVoxCore/DefaultIsQuadNeeded.h @@ -32,11 +32,11 @@ namespace PolyVox class DefaultIsQuadNeeded { public: - bool operator()(VoxelType back, VoxelType front, float& materialToUse) + bool operator()(VoxelType back, VoxelType front, uint32_t& materialToUse) { if((back > 0) && (front == 0)) { - materialToUse = static_cast(back); + materialToUse = static_cast(back); return true; } else diff --git a/library/PolyVoxCore/include/PolyVoxCore/Impl/CompilerCapabilities.h b/library/PolyVoxCore/include/PolyVoxCore/Impl/CompilerCapabilities.h index 1884e19e..074c3555 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Impl/CompilerCapabilities.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Impl/CompilerCapabilities.h @@ -15,7 +15,7 @@ // is a recent version) then assume support for these. #if !defined(_MSC_VER) || (_MSC_VER >= 1600) #define HAS_CXX11_CONSTEXPR - //#define HAS_CXX11_STATIC_ASSERT //This seems to cause issues on Android. + #define HAS_CXX11_STATIC_ASSERT #define HAS_CXX11_CSTDINT_H #define HAS_CXX11_SHARED_PTR #endif diff --git a/library/PolyVoxCore/include/PolyVoxCore/Impl/Utility.h b/library/PolyVoxCore/include/PolyVoxCore/Impl/Utility.h index ccd35ff1..6fa4795e 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Impl/Utility.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Impl/Utility.h @@ -52,8 +52,6 @@ namespace PolyVox { return (std::min)(high, (std::max)(low, value)); } - - float triangleFilter(float fInput); } #endif diff --git a/library/PolyVoxCore/include/PolyVoxCore/MarchingCubesSurfaceExtractor.inl b/library/PolyVoxCore/include/PolyVoxCore/MarchingCubesSurfaceExtractor.inl index 00c4bfac..5ef22675 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/MarchingCubesSurfaceExtractor.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/MarchingCubesSurfaceExtractor.inl @@ -461,7 +461,6 @@ namespace PolyVox //volume we get the one which is non-zero. Both materials can be non-zero if our volume has a density component. const typename Controller::MaterialType uMaterial000 = m_controller.convertToMaterial(v000); const typename Controller::MaterialType uMaterial100 = m_controller.convertToMaterial(v100); - //const typename Controller::MaterialType uMaterial = (std::max)(uMaterial000, uMaterial100); const typename Controller::MaterialType uMaterial = m_controller.blendMaterials(uMaterial000, uMaterial100, fInterp); const PositionMaterialNormal surfaceVertex(v3dPosition, v3dNormal, uMaterial); @@ -495,7 +494,6 @@ namespace PolyVox //volume we get the one which is non-zero. Both materials can be non-zero if our volume has a density component. const typename Controller::MaterialType uMaterial000 = m_controller.convertToMaterial(v000); const typename Controller::MaterialType uMaterial010 = m_controller.convertToMaterial(v010); - //const typename Controller::MaterialType uMaterial = (std::max)(uMaterial000, uMaterial010); const typename Controller::MaterialType uMaterial = m_controller.blendMaterials(uMaterial000, uMaterial010, fInterp); PositionMaterialNormal surfaceVertex(v3dPosition, v3dNormal, uMaterial); @@ -528,7 +526,6 @@ namespace PolyVox //volume we get the one which is non-zero. Both materials can be non-zero if our volume has a density component. const typename Controller::MaterialType uMaterial000 = m_controller.convertToMaterial(v000); const typename Controller::MaterialType uMaterial001 = m_controller.convertToMaterial(v001); - //const typename Controller::MaterialType uMaterial = (std::max)(uMaterial000, uMaterial001); const typename Controller::MaterialType uMaterial = m_controller.blendMaterials(uMaterial000, uMaterial001, fInterp); const PositionMaterialNormal surfaceVertex(v3dPosition, v3dNormal, uMaterial); @@ -640,4 +637,4 @@ namespace PolyVox }//For each cell } } -} \ No newline at end of file +} diff --git a/library/PolyVoxCore/include/PolyVoxCore/Region.h b/library/PolyVoxCore/include/PolyVoxCore/Region.h index 3a3383f0..8d654cd0 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Region.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Region.h @@ -141,21 +141,21 @@ namespace PolyVox /// Tests whether the given point is contained in this Region. bool containsPoint(const Vector3DFloat& pos, float boundary = 0.0f) const; /// Tests whether the given point is contained in this Region. - bool containsPoint(int32_t iX, int32_t iY, int32_t iZ, int8_t boundary = 0) const; + bool containsPoint(int32_t iX, int32_t iY, int32_t iZ, uint8_t boundary = 0) const; /// Tests whether the given point is contained in this Region. - bool containsPoint(const Vector3DInt32& pos, int8_t boundary = 0) const; + bool containsPoint(const Vector3DInt32& pos, uint8_t boundary = 0) const; /// Tests whether the given position is contained in the 'x' range of this Region. bool containsPointInX(float pos, float boundary = 0.0f) const; /// Tests whether the given position is contained in the 'x' range of this Region. - bool containsPointInX(int32_t pos, int8_t boundary = 0) const; + bool containsPointInX(int32_t pos, uint8_t boundary = 0) const; /// Tests whether the given position is contained in the 'y' range of this Region. bool containsPointInY(float pos, float boundary = 0.0f) const; /// Tests whether the given position is contained in the 'y' range of this Region. - bool containsPointInY(int32_t pos, int8_t boundary = 0) const; + bool containsPointInY(int32_t pos, uint8_t boundary = 0) const; /// Tests whether the given position is contained in the 'z' range of this Region. bool containsPointInZ(float pos, float boundary = 0.0f) const; /// Tests whether the given position is contained in the 'z' range of this Region. - bool containsPointInZ(int32_t pos, int8_t boundary = 0) const; + bool containsPointInZ(int32_t pos, uint8_t boundary = 0) const; /// Tests whether the given Region is contained in this Region. bool containsRegion(const Region& reg, uint8_t boundary = 0) const; diff --git a/library/PolyVoxCore/include/PolyVoxCore/SurfaceMesh.h b/library/PolyVoxCore/include/PolyVoxCore/SurfaceMesh.h index ce96c227..9ccc58fb 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SurfaceMesh.h +++ b/library/PolyVoxCore/include/PolyVoxCore/SurfaceMesh.h @@ -95,8 +95,8 @@ namespace PolyVox std::vector m_vecLodRecords; }; - /*template - polyvox_shared_ptr< SurfaceMesh > extractSubset(SurfaceMesh& inputMesh, std::set setMaterials);*/ + template + polyvox_shared_ptr< SurfaceMesh > extractSubset(SurfaceMesh& inputMesh, std::set setMaterials); } #include "PolyVoxCore/SurfaceMesh.inl" diff --git a/library/PolyVoxCore/include/PolyVoxCore/SurfaceMesh.inl b/library/PolyVoxCore/include/PolyVoxCore/SurfaceMesh.inl index e2dcf694..ae2b5b95 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SurfaceMesh.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SurfaceMesh.inl @@ -394,7 +394,7 @@ namespace PolyVox } //Currently a free function - think where this needs to go. - /*template + template polyvox_shared_ptr< SurfaceMesh > extractSubset(SurfaceMesh& inputMesh, std::set setMaterials) { polyvox_shared_ptr< SurfaceMesh > result(new SurfaceMesh); @@ -460,7 +460,7 @@ namespace PolyVox result->m_vecLodRecords.push_back(lodRecord); return result; - }*/ + } template void SurfaceMesh::scaleVertices(float amount) diff --git a/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.h b/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.h index 271f9d4d..5074a92c 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.h +++ b/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.h @@ -28,9 +28,6 @@ freely, subject to the following restrictions: namespace PolyVox { - template - typename VolumeType::VoxelType interpolatedSample(VolumeType* pVolume, float fPosX, float fPosY, float fPosZ, WrapMode eWrapMode, typename VolumeType::VoxelType tBorder); - template< typename SrcVolumeType, typename DstVolumeType> class VolumeResampler { @@ -42,7 +39,6 @@ namespace PolyVox private: void resampleSameSize(); void resampleArbitrary(); - void resampleBetter(); //Source data SrcVolumeType* m_pVolSrc; diff --git a/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl b/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl index aa241548..2c6c129d 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl @@ -23,43 +23,10 @@ freely, subject to the following restrictions: #include "PolyVoxCore/Interpolation.h" -#include "PolyVoxCore/Impl/Utility.h" - #include namespace PolyVox { - // Takes an interpolated sample of the volume data. - template - typename VolumeType::VoxelType interpolatedSample(VolumeType* pVolume, float fPosX, float fPosY, float fPosZ, WrapMode eWrapMode, typename VolumeType::VoxelType tBorder) - { - float fFloorX = floor(fPosX); - float fFloorY = floor(fPosY); - float fFloorZ = floor(fPosZ); - - float fInterpX = fPosX - fFloorX; - float fInterpY = fPosY - fFloorY; - float fInterpZ = fPosZ - fFloorZ; - - // Conditional logic required to round negative floats correctly - int32_t iX = static_cast(fFloorX > 0.0f ? fFloorX + 0.5f : fFloorX - 0.5f); - int32_t iY = static_cast(fFloorY > 0.0f ? fFloorY + 0.5f : fFloorY - 0.5f); - int32_t iZ = static_cast(fFloorZ > 0.0f ? fFloorZ + 0.5f : fFloorZ - 0.5f); - - const typename VolumeType::VoxelType& voxel000 = pVolume->getVoxelWithWrapping(iX, iY, iZ, eWrapMode, tBorder); - const typename VolumeType::VoxelType& voxel001 = pVolume->getVoxelWithWrapping(iX, iY, iZ + 1, eWrapMode, tBorder); - const typename VolumeType::VoxelType& voxel010 = pVolume->getVoxelWithWrapping(iX, iY + 1, iZ, eWrapMode, tBorder); - const typename VolumeType::VoxelType& voxel011 = pVolume->getVoxelWithWrapping(iX, iY + 1, iZ + 1, eWrapMode, tBorder); - const typename VolumeType::VoxelType& voxel100 = pVolume->getVoxelWithWrapping(iX + 1, iY, iZ, eWrapMode, tBorder); - const typename VolumeType::VoxelType& voxel101 = pVolume->getVoxelWithWrapping(iX + 1, iY, iZ + 1, eWrapMode, tBorder); - const typename VolumeType::VoxelType& voxel110 = pVolume->getVoxelWithWrapping(iX + 1, iY + 1, iZ, eWrapMode, tBorder); - const typename VolumeType::VoxelType& voxel111 = pVolume->getVoxelWithWrapping(iX + 1, iY + 1, iZ + 1, eWrapMode, tBorder); - - typename VolumeType::VoxelType tInterpolatedValue = PolyVox::trilerp(voxel000,voxel100,voxel010,voxel110,voxel001,voxel101,voxel011,voxel111,fInterpX,fInterpY,fInterpZ); - - return tInterpolatedValue; - } - /** * \param pVolSrc * \param regSrc @@ -86,16 +53,14 @@ namespace PolyVox int32_t uDstHeight = m_regDst.getUpperY() - m_regDst.getLowerY() + 1; int32_t uDstDepth = m_regDst.getUpperZ() - m_regDst.getLowerZ() + 1; - /*if((uSrcWidth == uDstWidth) && (uSrcHeight == uDstHeight) && (uSrcDepth == uDstDepth)) + if((uSrcWidth == uDstWidth) && (uSrcHeight == uDstHeight) && (uSrcDepth == uDstDepth)) { resampleSameSize(); } else { resampleArbitrary(); - }*/ - - resampleBetter(); + } } template< typename SrcVolumeType, typename DstVolumeType> @@ -162,7 +127,7 @@ namespace PolyVox sy = modf(sy, &dummy); sz = modf(sz, &dummy); - typename SrcVolumeType::VoxelType tInterpolatedValue = trilerp(voxel000,voxel100,voxel010,voxel110,voxel001,voxel101,voxel011,voxel111,sx,sy,sz); + typename SrcVolumeType::VoxelType tInterpolatedValue = trilerp(voxel000,voxel100,voxel010,voxel110,voxel001,voxel101,voxel011,voxel111,sx,sy,sz); typename DstVolumeType::VoxelType result = static_cast(tInterpolatedValue); m_pVolDst->setVoxelAt(dx,dy,dz,result); @@ -170,108 +135,4 @@ namespace PolyVox } } } - - template< typename SrcVolumeType, typename DstVolumeType> - void VolumeResampler::resampleBetter() - { - float srcWidth = m_regSrc.getWidthInCells(); - float srcHeight = m_regSrc.getHeightInCells(); - float srcDepth = m_regSrc.getDepthInCells(); - - float dstWidth = m_regDst.getWidthInCells(); - float dstHeight = m_regDst.getHeightInCells(); - float dstDepth = m_regDst.getDepthInCells(); - - float fScaleX = srcWidth / dstWidth; - float fScaleY = srcHeight / dstHeight; - float fScaleZ = srcDepth / dstDepth; - - typename SrcVolumeType::Sampler sampler(m_pVolSrc); - - // Should use SrcVolumeType? Or new template parameter? - Region regDownscaledX(0, 0, 0, m_regDst.getWidthInVoxels()-1, m_regSrc.getHeightInVoxels()-1, m_regSrc.getDepthInVoxels()-1); - SrcVolumeType volDownscaledX(regDownscaledX); - - for(int32_t tz = regDownscaledX.getLowerZ(); tz <= regDownscaledX.getUpperZ(); tz++) - { - for(int32_t ty = regDownscaledX.getLowerY(); ty <= regDownscaledX.getUpperY(); ty++) - { - for(int32_t tx = regDownscaledX.getLowerX(); tx <= regDownscaledX.getUpperX(); tx++) - { - float sx = (tx * fScaleX) + m_regSrc.getLowerCorner().getX(); - float sy = (ty ) + m_regSrc.getLowerCorner().getY(); - float sz = (tz ) + m_regSrc.getLowerCorner().getZ(); - - typename SrcVolumeType::VoxelType result = m_pVolSrc->getVoxelWithWrapping(sx, sy, sz, WrapModes::Border); - - //typename SrcVolumeType::VoxelType result = interpolatedSample(m_pVolSrc, sx, sy, sz, WrapModes::Border, SrcVolumeType::VoxelType(0)); - - volDownscaledX.setVoxelAt(tx, ty, tz, result); - } - } - } - - //Now downscale in y - Region regDownscaledXAndY(0, 0, 0, m_regDst.getWidthInVoxels()-1, m_regDst.getHeightInVoxels()-1, m_regSrc.getDepthInVoxels()-1); - SrcVolumeType volDownscaledXAndY(regDownscaledXAndY); - - for(int32_t tz = regDownscaledXAndY.getLowerZ(); tz <= regDownscaledXAndY.getUpperZ(); tz++) - { - for(int32_t ty = regDownscaledXAndY.getLowerY(); ty <= regDownscaledXAndY.getUpperY(); ty++) - { - for(int32_t tx = regDownscaledXAndY.getLowerX(); tx <= regDownscaledXAndY.getUpperX(); tx++) - { - float sx = (tx ); - float sy = (ty * fScaleY); - float sz = (tz ); - - typename SrcVolumeType::VoxelType result = volDownscaledX.getVoxelWithWrapping(sx, sy, sz, WrapModes::Border); - - volDownscaledXAndY.setVoxelAt(tx, ty, tz, result); - } - } - } - - //Now copy and downscale to dst. - //Region regDst = m_pVolDst->getEnclosingRegion(); - - for(int32_t tz = m_regDst.getLowerZ(); tz <= m_regDst.getUpperZ(); tz++) - { - for(int32_t ty = m_regDst.getLowerY(); ty <= m_regDst.getUpperY(); ty++) - { - for(int32_t tx = m_regDst.getLowerX(); tx <= m_regDst.getUpperX(); tx++) - { - float sx = (tx - m_regDst.getLowerX()); - float sy = (ty - m_regDst.getLowerY()); - float sLowerZ = ((tz - 1) - m_regDst.getLowerZ()) * fScaleZ; - float sCentreZ = ((tz ) - m_regDst.getLowerZ()) * fScaleZ; - float sUpperZ = ((tz + 1) - m_regDst.getLowerZ()) * fScaleZ; - - float sumOfWeights = 0.0f; - //typename SrcVolumeType::VoxelType tSum = SrcVolumeType::VoxelType(0); - - //We should be able to use a higher range MultiMaterial rather than needing to use a Vector of floats. - //We shouold also probably support an Accumulation type rather than hard coding. - Vector<4, float> vecSum(0.0, 0.0, 0.0, 0.0); - - for(float sz = sLowerZ; sz <= sUpperZ; sz += 1.0) - { - float weight = triangleFilter(sz - sCentreZ); - sumOfWeights += weight; - - //This is wrong! There's no need to do interpolation. Just multiply the sameple by the correct kernel value. - Vector<4, float> sample = interpolatedSample(&volDownscaledXAndY, sx, sy, sz, WrapModes::Border, SrcVolumeType::VoxelType()); - - vecSum += (sample * weight); - } - - vecSum /= sumOfWeights; //Should divide by 'norm' - - typename SrcVolumeType::VoxelType tResult = vecSum; //Should divide by 'norm' - - m_pVolDst->setVoxelAt(tx, ty, tz, tResult); - } - } - } - } } diff --git a/library/PolyVoxCore/source/Impl/Utility.cpp b/library/PolyVoxCore/source/Impl/Utility.cpp index 555e947c..1c9c152f 100644 --- a/library/PolyVoxCore/source/Impl/Utility.cpp +++ b/library/PolyVoxCore/source/Impl/Utility.cpp @@ -69,9 +69,4 @@ namespace PolyVox v++; return v; } - - float triangleFilter(float fInput) - { - return (std::max)(1.0f - (std::abs)(fInput), 0.0f); - } } diff --git a/library/PolyVoxCore/source/Region.cpp b/library/PolyVoxCore/source/Region.cpp index 5e248dc5..50e837af 100644 --- a/library/PolyVoxCore/source/Region.cpp +++ b/library/PolyVoxCore/source/Region.cpp @@ -201,7 +201,7 @@ namespace PolyVox * \param iZ The 'z' position of the point to test. * \param boundary The desired boundary value. */ - bool Region::containsPoint(int32_t iX, int32_t iY, int32_t iZ, int8_t boundary) const + bool Region::containsPoint(int32_t iX, int32_t iY, int32_t iZ, uint8_t boundary) const { return (iX <= m_iUpperX - boundary) && (iY <= m_iUpperY - boundary) @@ -218,7 +218,7 @@ namespace PolyVox * \param pos The position to test. * \param boundary The desired boundary value. */ - bool Region::containsPoint(const Vector3DInt32& pos, int8_t boundary) const + bool Region::containsPoint(const Vector3DInt32& pos, uint8_t boundary) const { return containsPoint(pos.getX(), pos.getY(), pos.getZ(), boundary); } @@ -243,7 +243,7 @@ namespace PolyVox * \param pos The position to test. * \param boundary The desired boundary value. */ - bool Region::containsPointInX(int32_t pos, int8_t boundary) const + bool Region::containsPointInX(int32_t pos, uint8_t boundary) const { return (pos <= m_iUpperX - boundary) && (pos >= m_iLowerX + boundary); @@ -269,7 +269,7 @@ namespace PolyVox * \param pos The position to test. * \param boundary The desired boundary value. */ - bool Region::containsPointInY(int32_t pos, int8_t boundary) const + bool Region::containsPointInY(int32_t pos, uint8_t boundary) const { return (pos <= m_iUpperY - boundary) && (pos >= m_iLowerY + boundary); @@ -295,7 +295,7 @@ namespace PolyVox * \param pos The position to test. * \param boundary The desired boundary value. */ - bool Region::containsPointInZ(int32_t pos, int8_t boundary) const + bool Region::containsPointInZ(int32_t pos, uint8_t boundary) const { return (pos <= m_iUpperZ - boundary) && (pos >= m_iLowerZ + boundary);