diff --git a/examples/OpenGL/main.cpp b/examples/OpenGL/main.cpp index 22ad8e6f..9930082a 100644 --- a/examples/OpenGL/main.cpp +++ b/examples/OpenGL/main.cpp @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) createCubeInVolume(volData, Vector3DInt32(midPos-10, midPos-10 ,1), Vector3DInt32(midPos+10, midPos+10, maxPos-1), MaterialDensityPair44::getMaxDensity()); //Smooth part of the volume - RawVolume tempVolume(Region(0,0,0,128, 128, 128)); + RawVolume tempVolume(PolyVox::Region(0,0,0,128, 128, 128)); LowPassFilter pass1(&volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), &tempVolume, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), 3); pass1.executeSAT(); LowPassFilter pass2(&tempVolume, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), &volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), 3); diff --git a/library/PolyVoxCore/include/PolyVoxCore/Density.h b/library/PolyVoxCore/include/PolyVoxCore/Density.h index 5994b0f3..da0d14c7 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Density.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Density.h @@ -26,6 +26,8 @@ freely, subject to the following restrictions: #include "PolyVoxImpl/TypeDef.h" +#include + namespace PolyVox { ///This class represents a voxel storing only a density. @@ -61,7 +63,7 @@ namespace PolyVox Type getMaterial() const throw() { return 1; } void setDensity(Type uDensity) { m_uDensity = uDensity; } - void setMaterial(Type uMaterial) { assert("Cannot set material on voxel of type 'Density'"); } + void setMaterial(Type uMaterial) { assert(false); } //Cannot set material on voxel of type Density static Type getMaxDensity() throw() { return (0x01 << (sizeof(Type) * 8)) - 1; } static Type getMinDensity() throw() { return 0; } diff --git a/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl b/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl index b3f6fce5..9e6bc66d 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl @@ -62,7 +62,7 @@ namespace PolyVox //int32_t iDstMaxY = m_regDst.getUpperCorner().getY(); //int32_t iDstMaxZ = m_regDst.getUpperCorner().getZ(); - SrcVolumeType::Sampler srcSampler(m_pVolSrc); + typename SrcVolumeType::Sampler srcSampler(m_pVolSrc); for(int32_t iSrcZ = iSrcMinZ, iDstZ = iDstMinZ; iSrcZ <= iSrcMaxZ; iSrcZ++, iDstZ++) { @@ -144,9 +144,9 @@ namespace PolyVox satIterCont.m_Iter = &satVolumeIter; satIterCont.reset(); - SrcVolumeType::Sampler srcVolumeIter(m_pVolSrc); + typename SrcVolumeType::Sampler srcVolumeIter(m_pVolSrc); - IteratorController::Sampler> srcIterCont; + IteratorController::Sampler> srcIterCont; srcIterCont.m_regValid = Region(satLowerCorner, satUpperCorner); srcIterCont.m_Iter = &srcVolumeIter; srcIterCont.reset(); diff --git a/library/PolyVoxCore/include/PolyVoxCore/Material.h b/library/PolyVoxCore/include/PolyVoxCore/Material.h index 040c482a..445961b0 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Material.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Material.h @@ -75,7 +75,7 @@ namespace PolyVox Type getMaterial() const throw() { return m_uMaterial; } - void setDensity(Type /*uDensity*/) { assert("Cannot set density on voxel of type 'Material'"); } + void setDensity(Type /*uDensity*/) { assert(false); } //Cannot set density on voxel of type Material void setMaterial(Type uMaterial) { m_uMaterial = uMaterial; } static Type getMaxDensity() throw() { return 2; } diff --git a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl index c6d0f62e..93e41ca1 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl @@ -76,7 +76,7 @@ namespace PolyVox { if(this->m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos))) { - const Vector3DInt32& v3dLowerCorner = m_regValidRegion.getLowerCorner(); + const Vector3DInt32& v3dLowerCorner = this->m_regValidRegion.getLowerCorner(); int32_t iLocalXPos = uXPos - v3dLowerCorner.getX(); int32_t iLocalYPos = uYPos - v3dLowerCorner.getY(); int32_t iLocalZPos = uZPos - v3dLowerCorner.getZ(); @@ -125,7 +125,7 @@ namespace PolyVox { if(this->m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos))) { - const Vector3DInt32& v3dLowerCorner = m_regValidRegion.getLowerCorner(); + const Vector3DInt32& v3dLowerCorner = this->m_regValidRegion.getLowerCorner(); int32_t iLocalXPos = uXPos - v3dLowerCorner.getX(); int32_t iLocalYPos = uYPos - v3dLowerCorner.getY(); int32_t iLocalZPos = uZPos - v3dLowerCorner.getZ(); diff --git a/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl b/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl index 7f2d70f7..3d40273c 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl @@ -93,9 +93,9 @@ namespace PolyVox mCurrentVoxel = this->mVolume->m_pData + uVoxelIndex; - m_bIsCurrentPositionValidInX = mVolume->getEnclosingRegion().containsPointInX(xPos); - m_bIsCurrentPositionValidInY = mVolume->getEnclosingRegion().containsPointInY(yPos); - m_bIsCurrentPositionValidInZ = mVolume->getEnclosingRegion().containsPointInZ(zPos); + m_bIsCurrentPositionValidInX = this->mVolume->getEnclosingRegion().containsPointInX(xPos); + m_bIsCurrentPositionValidInY = this->mVolume->getEnclosingRegion().containsPointInY(yPos); + m_bIsCurrentPositionValidInZ = this->mVolume->getEnclosingRegion().containsPointInZ(zPos); } template