diff --git a/library/PolyVoxCore/include/PolyVoxCore/Density.h b/library/PolyVoxCore/include/PolyVoxCore/Density.h index b2e01217..a4d784b4 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Density.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Density.h @@ -109,7 +109,7 @@ namespace PolyVox namespace PolyVox { template<> - typename VoxelTypeTraits::DensityType convertToDensity(Density8 voxel); + VoxelTypeTraits::DensityType convertToDensity(Density8 voxel); template<> class ConvertToDensity diff --git a/library/PolyVoxCore/include/PolyVoxCore/MaterialDensityPair.h b/library/PolyVoxCore/include/PolyVoxCore/MaterialDensityPair.h index 7c364844..00a25374 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/MaterialDensityPair.h +++ b/library/PolyVoxCore/include/PolyVoxCore/MaterialDensityPair.h @@ -125,10 +125,10 @@ namespace PolyVox namespace PolyVox { template<> - typename VoxelTypeTraits::DensityType convertToDensity(MaterialDensityPair44 voxel); + VoxelTypeTraits::DensityType convertToDensity(MaterialDensityPair44 voxel); template<> - typename VoxelTypeTraits::DensityType convertToDensity(MaterialDensityPair88 voxel); + VoxelTypeTraits::DensityType convertToDensity(MaterialDensityPair88 voxel); template<> class ConvertToDensity diff --git a/library/PolyVoxCore/include/PolyVoxCore/SurfaceExtractor.inl b/library/PolyVoxCore/include/PolyVoxCore/SurfaceExtractor.inl index bdcf2eb0..51ccec58 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SurfaceExtractor.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SurfaceExtractor.inl @@ -206,7 +206,7 @@ namespace PolyVox typename VolumeType::VoxelType v011; typename VolumeType::VoxelType v111; - ConvertToDensity DensityConverter; + ConvertToDensity DensityConverter; if(isPrevZAvail) { @@ -399,7 +399,7 @@ namespace PolyVox Array2DInt32& m_pCurrentVertexIndicesY, Array2DInt32& m_pCurrentVertexIndicesZ) { - ConvertToMaterial converter; + ConvertToMaterial converter; int32_t iZVolSpace = m_regSliceCurrent.getLowerCorner().getZ(); const uint32_t uZRegSpace = iZVolSpace - m_regSizeInVoxels.getLowerCorner().getZ(); @@ -447,9 +447,9 @@ namespace PolyVox //Choose one of the two materials to use for the vertex (we don't interpolate as interpolation of //material IDs does not make sense). We take the largest, so that if we are working on a material-only //volume we get the one which is non-zero. Both materials can be non-zero if our volume has a density component. - ConvertToMaterial::MaterialType uMaterial000 = converter(v000); - ConvertToMaterial::MaterialType uMaterial100 = converter(v100); - ConvertToMaterial::MaterialType uMaterial = (std::max)(uMaterial000, uMaterial100); + typename ConvertToMaterial::MaterialType uMaterial000 = converter(v000); + typename ConvertToMaterial::MaterialType uMaterial100 = converter(v100); + typename ConvertToMaterial::MaterialType uMaterial = (std::max)(uMaterial000, uMaterial100); PositionMaterialNormal surfaceVertex(v3dPosition, v3dNormal, static_cast(uMaterial)); uint32_t uLastVertexIndex = m_meshCurrent->addVertex(surfaceVertex); @@ -473,8 +473,8 @@ namespace PolyVox //Choose one of the two materials to use for the vertex (we don't interpolate as interpolation of //material IDs does not make sense). We take the largest, so that if we are working on a material-only //volume we get the one which is non-zero. Both materials can be non-zero if our volume has a density component. - ConvertToMaterial::MaterialType uMaterial000 = converter(v000); - ConvertToMaterial::MaterialType uMaterial010 = converter(v010); + typename ConvertToMaterial::MaterialType uMaterial000 = converter(v000); + typename ConvertToMaterial::MaterialType uMaterial010 = converter(v010); uint32_t uMaterial = (std::max)(uMaterial000, uMaterial010); PositionMaterialNormal surfaceVertex(v3dPosition, v3dNormal, static_cast(uMaterial)); @@ -499,8 +499,8 @@ namespace PolyVox //Choose one of the two materials to use for the vertex (we don't interpolate as interpolation of //material IDs does not make sense). We take the largest, so that if we are working on a material-only //volume we get the one which is non-zero. Both materials can be non-zero if our volume has a density component. - ConvertToMaterial::MaterialType uMaterial000 = converter(v000); - ConvertToMaterial::MaterialType uMaterial001 = converter(v001); + typename ConvertToMaterial::MaterialType uMaterial000 = converter(v000); + typename ConvertToMaterial::MaterialType uMaterial001 = converter(v001); uint32_t uMaterial = (std::max)(uMaterial000, uMaterial001); PositionMaterialNormal surfaceVertex(v3dPosition, v3dNormal, static_cast(uMaterial)); diff --git a/library/PolyVoxCore/source/MaterialDensityPair.cpp b/library/PolyVoxCore/source/MaterialDensityPair.cpp index 199514a0..50d5d271 100644 --- a/library/PolyVoxCore/source/MaterialDensityPair.cpp +++ b/library/PolyVoxCore/source/MaterialDensityPair.cpp @@ -26,13 +26,13 @@ freely, subject to the following restrictions: namespace PolyVox { template<> - typename VoxelTypeTraits::DensityType convertToDensity(MaterialDensityPair44 voxel) + VoxelTypeTraits::DensityType convertToDensity(MaterialDensityPair44 voxel) { return voxel.getDensity(); } template<> - typename VoxelTypeTraits::DensityType convertToDensity(MaterialDensityPair88 voxel) + VoxelTypeTraits::DensityType convertToDensity(MaterialDensityPair88 voxel) { return voxel.getDensity(); } diff --git a/tests/TestCubicSurfaceExtractor.cpp b/tests/TestCubicSurfaceExtractor.cpp index 21b3972d..bd262dca 100644 --- a/tests/TestCubicSurfaceExtractor.cpp +++ b/tests/TestCubicSurfaceExtractor.cpp @@ -44,13 +44,13 @@ void writeDensityValueToVoxel(typename VoxelTypeTraits::DensityType v } template<> -void writeDensityValueToVoxel(typename VoxelTypeTraits::DensityType valueToWrite, Density8& voxel) +void writeDensityValueToVoxel(VoxelTypeTraits::DensityType valueToWrite, Density8& voxel) { voxel.setDensity(valueToWrite); } template<> -void writeDensityValueToVoxel(typename VoxelTypeTraits::DensityType valueToWrite, MaterialDensityPair88& voxel) +void writeDensityValueToVoxel(VoxelTypeTraits::DensityType valueToWrite, MaterialDensityPair88& voxel) { voxel.setDensity(valueToWrite); } @@ -63,7 +63,7 @@ void writeMaterialValueToVoxel(typename VoxelTypeTraits::MaterialType } template<> -void writeMaterialValueToVoxel(typename VoxelTypeTraits::MaterialType valueToWrite, MaterialDensityPair88& voxel) +void writeMaterialValueToVoxel(VoxelTypeTraits::MaterialType valueToWrite, MaterialDensityPair88& voxel) { voxel.setMaterial(valueToWrite); } diff --git a/tests/TestSurfaceExtractor.cpp b/tests/TestSurfaceExtractor.cpp index e412d515..c0c981d1 100644 --- a/tests/TestSurfaceExtractor.cpp +++ b/tests/TestSurfaceExtractor.cpp @@ -43,13 +43,13 @@ void writeDensityValueToVoxel(typename VoxelTypeTraits::DensityType v } template<> -void writeDensityValueToVoxel(typename VoxelTypeTraits::DensityType valueToWrite, Density8& voxel) +void writeDensityValueToVoxel(VoxelTypeTraits::DensityType valueToWrite, Density8& voxel) { voxel.setDensity(valueToWrite); } template<> -void writeDensityValueToVoxel(typename VoxelTypeTraits::DensityType valueToWrite, MaterialDensityPair88& voxel) +void writeDensityValueToVoxel(VoxelTypeTraits::DensityType valueToWrite, MaterialDensityPair88& voxel) { voxel.setDensity(valueToWrite); } @@ -62,7 +62,7 @@ void writeMaterialValueToVoxel(typename VoxelTypeTraits::MaterialType } template<> -void writeMaterialValueToVoxel(typename VoxelTypeTraits::MaterialType valueToWrite, MaterialDensityPair88& voxel) +void writeMaterialValueToVoxel(VoxelTypeTraits::MaterialType valueToWrite, MaterialDensityPair88& voxel) { voxel.setMaterial(valueToWrite); }