diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 8103068d..21b11a23 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -33,7 +33,7 @@ endif() add_subdirectory(PolyVoxCore) add_subdirectory(PolyVoxUtil) -#add_subdirectory(bindings) +add_subdirectory(bindings) #Set up install paths e.g. for PolyVoxConfig.cmake if(WIN32) diff --git a/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.inl b/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.inl index 1a3e9587..766e4a73 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.inl @@ -136,7 +136,7 @@ namespace PolyVox template bool AmbientOcclusionCalculator::raycastCallback(const typename VolumeType::Sampler& sampler) { - VolumeType::VoxelType voxel = sampler.getVoxel(); + typename VolumeType::VoxelType voxel = sampler.getVoxel(); return m_funcIsTransparent(voxel); } } diff --git a/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractor.inl b/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractor.inl index 5155e034..5ff1c6ac 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractor.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractor.inl @@ -90,10 +90,10 @@ namespace PolyVox volumeSampler.setPosition(x,y,z); - VolumeType::VoxelType currentVoxel = volumeSampler.getVoxel(); + typename VolumeType::VoxelType currentVoxel = volumeSampler.getVoxel(); bool currentVoxelIsSolid = currentVoxel.getMaterial() != 0; - VolumeType::VoxelType negXVoxel = volumeSampler.peekVoxel1nx0py0pz(); + typename VolumeType::VoxelType negXVoxel = volumeSampler.peekVoxel1nx0py0pz(); bool negXVoxelIsSolid = negXVoxel.getMaterial() != 0; if((currentVoxelIsSolid != negXVoxelIsSolid) && (finalY == false) && (finalZ == false)) @@ -130,7 +130,7 @@ namespace PolyVox } } - VolumeType::VoxelType negYVoxel = volumeSampler.peekVoxel0px1ny0pz(); + typename VolumeType::VoxelType negYVoxel = volumeSampler.peekVoxel0px1ny0pz(); bool negYVoxelIsSolid = negYVoxel.getMaterial() != 0; if((currentVoxelIsSolid != negYVoxelIsSolid) && (finalX == false) && (finalZ == false)) @@ -167,7 +167,7 @@ namespace PolyVox } } - VolumeType::VoxelType negZVoxel = volumeSampler.peekVoxel0px0py1nz(); + typename VolumeType::VoxelType negZVoxel = volumeSampler.peekVoxel0px0py1nz(); bool negZVoxelIsSolid = negZVoxel.getMaterial() != 0; if((currentVoxelIsSolid != negZVoxelIsSolid) && (finalX == false) && (finalY == false)) diff --git a/library/PolyVoxCore/include/PolyVoxCore/GradientEstimators.inl b/library/PolyVoxCore/include/PolyVoxCore/GradientEstimators.inl index 9382d9ce..cc401ad3 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/GradientEstimators.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/GradientEstimators.inl @@ -27,14 +27,14 @@ namespace PolyVox Vector3DFloat computeCentralDifferenceGradient(const typename VolumeType::Sampler& volIter) { //FIXME - bitwise way of doing this? - VolumeType::VoxelType voxel1nx = volIter.peekVoxel1nx0py0pz() > 0 ? 1: 0; - VolumeType::VoxelType voxel1px = volIter.peekVoxel1px0py0pz() > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1nx = volIter.peekVoxel1nx0py0pz() > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1px = volIter.peekVoxel1px0py0pz() > 0 ? 1: 0; - VolumeType::VoxelType voxel1ny = volIter.peekVoxel0px1ny0pz() > 0 ? 1: 0; - VolumeType::VoxelType voxel1py = volIter.peekVoxel0px1py0pz() > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1ny = volIter.peekVoxel0px1ny0pz() > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1py = volIter.peekVoxel0px1py0pz() > 0 ? 1: 0; - VolumeType::VoxelType voxel1nz = volIter.peekVoxel0px0py1nz() > 0 ? 1: 0; - VolumeType::VoxelType voxel1pz = volIter.peekVoxel0px0py1pz() > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1nz = volIter.peekVoxel0px0py1nz() > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1pz = volIter.peekVoxel0px0py1pz() > 0 ? 1: 0; return Vector3DFloat ( @@ -52,14 +52,14 @@ namespace PolyVox const int32_t z = volIter.getPosition().getZ(); //FIXME - bitwise way of doing this? - VolumeType::VoxelType voxel1nx = volIter.getVoxelAt(x-2, y ,z ) > 0 ? 1: 0; - VolumeType::VoxelType voxel1px = volIter.getVoxelAt(x-2, y ,z ) > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1nx = volIter.getVoxelAt(x-2, y ,z ) > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1px = volIter.getVoxelAt(x-2, y ,z ) > 0 ? 1: 0; - VolumeType::VoxelType voxel1ny = volIter.getVoxelAt(x , y-2,z ) > 0 ? 1: 0; - VolumeType::VoxelType voxel1py = volIter.getVoxelAt(x , y-2,z ) > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1ny = volIter.getVoxelAt(x , y-2,z ) > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1py = volIter.getVoxelAt(x , y-2,z ) > 0 ? 1: 0; - VolumeType::VoxelType voxel1nz = volIter.getVoxelAt(x , y ,z-2) > 0 ? 1: 0; - VolumeType::VoxelType voxel1pz = volIter.getVoxelAt(x , y ,z-2) > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1nz = volIter.getVoxelAt(x , y ,z-2) > 0 ? 1: 0; + typename VolumeType::VoxelType voxel1pz = volIter.getVoxelAt(x , y ,z-2) > 0 ? 1: 0; return Vector3DFloat ( @@ -106,35 +106,35 @@ namespace PolyVox 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} } }; - const VolumeType::VoxelType pVoxel1nx1ny1nz = volIter.peekVoxel1nx1ny1nz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1nx1ny0pz = volIter.peekVoxel1nx1ny0pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1nx1ny1pz = volIter.peekVoxel1nx1ny1pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1nx0py1nz = volIter.peekVoxel1nx0py1nz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1nx0py0pz = volIter.peekVoxel1nx0py0pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1nx0py1pz = volIter.peekVoxel1nx0py1pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1nx1py1nz = volIter.peekVoxel1nx1py1nz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1nx1py0pz = volIter.peekVoxel1nx1py0pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1nx1py1pz = volIter.peekVoxel1nx1py1pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1nx1ny1nz = volIter.peekVoxel1nx1ny1nz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1nx1ny0pz = volIter.peekVoxel1nx1ny0pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1nx1ny1pz = volIter.peekVoxel1nx1ny1pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1nx0py1nz = volIter.peekVoxel1nx0py1nz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1nx0py0pz = volIter.peekVoxel1nx0py0pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1nx0py1pz = volIter.peekVoxel1nx0py1pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1nx1py1nz = volIter.peekVoxel1nx1py1nz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1nx1py0pz = volIter.peekVoxel1nx1py0pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1nx1py1pz = volIter.peekVoxel1nx1py1pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel0px1ny1nz = volIter.peekVoxel0px1ny1nz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel0px1ny0pz = volIter.peekVoxel0px1ny0pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel0px1ny1pz = volIter.peekVoxel0px1ny1pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel0px0py1nz = volIter.peekVoxel0px0py1nz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel0px1ny1nz = volIter.peekVoxel0px1ny1nz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel0px1ny0pz = volIter.peekVoxel0px1ny0pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel0px1ny1pz = volIter.peekVoxel0px1ny1pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel0px0py1nz = volIter.peekVoxel0px0py1nz() > 0 ? 1: 0; //const VolumeType::VoxelType pVoxel0px0py0pz = volIter.peekVoxel0px0py0pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel0px0py1pz = volIter.peekVoxel0px0py1pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel0px1py1nz = volIter.peekVoxel0px1py1nz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel0px1py0pz = volIter.peekVoxel0px1py0pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel0px1py1pz = volIter.peekVoxel0px1py1pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel0px0py1pz = volIter.peekVoxel0px0py1pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel0px1py1nz = volIter.peekVoxel0px1py1nz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel0px1py0pz = volIter.peekVoxel0px1py0pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel0px1py1pz = volIter.peekVoxel0px1py1pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1px1ny1nz = volIter.peekVoxel1px1ny1nz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1px1ny0pz = volIter.peekVoxel1px1ny0pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1px1ny1pz = volIter.peekVoxel1px1ny1pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1px0py1nz = volIter.peekVoxel1px0py1nz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1px0py0pz = volIter.peekVoxel1px0py0pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1px0py1pz = volIter.peekVoxel1px0py1pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1px1py1nz = volIter.peekVoxel1px1py1nz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1px1py0pz = volIter.peekVoxel1px1py0pz() > 0 ? 1: 0; - const VolumeType::VoxelType pVoxel1px1py1pz = volIter.peekVoxel1px1py1pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1px1ny1nz = volIter.peekVoxel1px1ny1nz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1px1ny0pz = volIter.peekVoxel1px1ny0pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1px1ny1pz = volIter.peekVoxel1px1ny1pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1px0py1nz = volIter.peekVoxel1px0py1nz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1px0py0pz = volIter.peekVoxel1px0py0pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1px0py1pz = volIter.peekVoxel1px0py1pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1px1py1nz = volIter.peekVoxel1px1py1nz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1px1py0pz = volIter.peekVoxel1px1py0pz() > 0 ? 1: 0; + const typename VolumeType::VoxelType pVoxel1px1py1pz = volIter.peekVoxel1px1py1pz() > 0 ? 1: 0; const int xGrad(- weights[0][0][0] * pVoxel1nx1ny1nz - weights[1][0][0] * pVoxel1nx1ny0pz - weights[2][0][0] * diff --git a/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl b/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl index c5114c9e..d64769eb 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl @@ -73,7 +73,7 @@ namespace PolyVox //VoxelType tSrcVoxel = m_pVolSrc->getVoxelAt(iSrcX, iSrcY, iSrcZ); srcSampler.setPosition(iSrcX, iSrcY, iSrcZ); - SrcVolumeType::VoxelType tSrcVoxel = srcSampler.getVoxel(); + typename SrcVolumeType::VoxelType tSrcVoxel = srcSampler.getVoxel(); uint32_t uDensity = 0; uDensity += convertToDensity(srcSampler.peekVoxel1nx1ny1nz()); @@ -247,7 +247,7 @@ namespace PolyVox float average = sum / (static_cast(sideLength*sideLength*sideLength)); //Note: These lines need consideration if src and dest have different voxel types. - SrcVolumeType::VoxelType voxel = m_pVolSrc->getVoxelAt(iDstX, iDstY, iDstZ); + typename SrcVolumeType::VoxelType voxel = m_pVolSrc->getVoxelAt(iDstX, iDstY, iDstZ); voxel.setDensity(static_cast(average)); diff --git a/library/PolyVoxCore/include/PolyVoxCore/SurfaceExtractor.inl b/library/PolyVoxCore/include/PolyVoxCore/SurfaceExtractor.inl index 65815cbb..bdcf2eb0 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SurfaceExtractor.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SurfaceExtractor.inl @@ -197,14 +197,14 @@ namespace PolyVox { uint8_t iCubeIndex = 0; - VolumeType::VoxelType v000; - VolumeType::VoxelType v100; - VolumeType::VoxelType v010; - VolumeType::VoxelType v110; - VolumeType::VoxelType v001; - VolumeType::VoxelType v101; - VolumeType::VoxelType v011; - VolumeType::VoxelType v111; + typename VolumeType::VoxelType v000; + typename VolumeType::VoxelType v100; + typename VolumeType::VoxelType v010; + typename VolumeType::VoxelType v110; + typename VolumeType::VoxelType v001; + typename VolumeType::VoxelType v101; + typename VolumeType::VoxelType v011; + typename VolumeType::VoxelType v111; ConvertToDensity DensityConverter; @@ -427,14 +427,14 @@ namespace PolyVox m_sampVolume.setPosition(iXVolSpace,iYVolSpace,iZVolSpace); - const VolumeType::VoxelType v000 = m_sampVolume.getVoxel(); + const typename VolumeType::VoxelType v000 = m_sampVolume.getVoxel(); const Vector3DFloat n000 = computeCentralDifferenceGradient(m_sampVolume); /* Find the vertices where the surface intersects the cube */ if (edgeTable[iCubeIndex] & 1) { m_sampVolume.movePositiveX(); - const VolumeType::VoxelType v100 = m_sampVolume.getVoxel(); + const typename VolumeType::VoxelType v100 = m_sampVolume.getVoxel(); const Vector3DFloat n100 = computeCentralDifferenceGradient(m_sampVolume); float fInterp = static_cast(m_tThreshold - convertToDensity(v000)) / static_cast(convertToDensity(v100) - convertToDensity(v000)); @@ -460,7 +460,7 @@ namespace PolyVox if (edgeTable[iCubeIndex] & 8) { m_sampVolume.movePositiveY(); - const VolumeType::VoxelType v010 = m_sampVolume.getVoxel(); + const typename VolumeType::VoxelType v010 = m_sampVolume.getVoxel(); const Vector3DFloat n010 = computeCentralDifferenceGradient(m_sampVolume); float fInterp = static_cast(m_tThreshold - convertToDensity(v000)) / static_cast(convertToDensity(v010) - convertToDensity(v000)); @@ -486,7 +486,7 @@ namespace PolyVox if (edgeTable[iCubeIndex] & 256) { m_sampVolume.movePositiveZ(); - const VolumeType::VoxelType v001 = m_sampVolume.getVoxel(); + const typename VolumeType::VoxelType v001 = m_sampVolume.getVoxel(); const Vector3DFloat n001 = computeCentralDifferenceGradient(m_sampVolume); float fInterp = static_cast(m_tThreshold - convertToDensity(v000)) / static_cast(convertToDensity(v001) - convertToDensity(v000)); diff --git a/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl b/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl index 7322973f..e5db62d0 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/VolumeResampler.inl @@ -65,7 +65,7 @@ namespace PolyVox for(int32_t sx = m_regSrc.getLowerCorner().getX(), dx = m_regDst.getLowerCorner().getX(); dx <= m_regDst.getUpperCorner().getX(); sx++,dx++) { //Note: Consider what should happen if src and dest have different voxel types. - SrcVolumeType::VoxelType voxel = m_pVolSrc->getVoxelAt(sx,sy,sz); + typename SrcVolumeType::VoxelType voxel = m_pVolSrc->getVoxelAt(sx,sy,sz); m_pVolDst->setVoxelAt(dx,dy,dz,voxel); } } @@ -104,23 +104,23 @@ namespace PolyVox sz += m_regSrc.getLowerCorner().getZ(); sampler.setPosition(sx,sy,sz); - SrcVolumeType::VoxelType voxel000 = sampler.peekVoxel0px0py0pz(); - SrcVolumeType::VoxelType voxel001 = sampler.peekVoxel0px0py1pz(); - SrcVolumeType::VoxelType voxel010 = sampler.peekVoxel0px1py0pz(); - SrcVolumeType::VoxelType voxel011 = sampler.peekVoxel0px1py1pz(); - SrcVolumeType::VoxelType voxel100 = sampler.peekVoxel1px0py0pz(); - SrcVolumeType::VoxelType voxel101 = sampler.peekVoxel1px0py1pz(); - SrcVolumeType::VoxelType voxel110 = sampler.peekVoxel1px1py0pz(); - SrcVolumeType::VoxelType voxel111 = sampler.peekVoxel1px1py1pz(); + typename SrcVolumeType::VoxelType voxel000 = sampler.peekVoxel0px0py0pz(); + typename SrcVolumeType::VoxelType voxel001 = sampler.peekVoxel0px0py1pz(); + typename SrcVolumeType::VoxelType voxel010 = sampler.peekVoxel0px1py0pz(); + typename SrcVolumeType::VoxelType voxel011 = sampler.peekVoxel0px1py1pz(); + typename SrcVolumeType::VoxelType voxel100 = sampler.peekVoxel1px0py0pz(); + typename SrcVolumeType::VoxelType voxel101 = sampler.peekVoxel1px0py1pz(); + typename SrcVolumeType::VoxelType voxel110 = sampler.peekVoxel1px1py0pz(); + typename SrcVolumeType::VoxelType voxel111 = sampler.peekVoxel1px1py1pz(); - typename VoxelTypeTraits::DensityType voxel000Den = convertToDensity(voxel000); - typename VoxelTypeTraits::DensityType voxel001Den = convertToDensity(voxel001); - typename VoxelTypeTraits::DensityType voxel010Den = convertToDensity(voxel010); - typename VoxelTypeTraits::DensityType voxel011Den = convertToDensity(voxel011); - typename VoxelTypeTraits::DensityType voxel100Den = convertToDensity(voxel100); - typename VoxelTypeTraits::DensityType voxel101Den = convertToDensity(voxel101); - typename VoxelTypeTraits::DensityType voxel110Den = convertToDensity(voxel110); - typename VoxelTypeTraits::DensityType voxel111Den = convertToDensity(voxel111); + typename VoxelTypeTraits::DensityType voxel000Den = convertToDensity(voxel000); + typename VoxelTypeTraits::DensityType voxel001Den = convertToDensity(voxel001); + typename VoxelTypeTraits::DensityType voxel010Den = convertToDensity(voxel010); + typename VoxelTypeTraits::DensityType voxel011Den = convertToDensity(voxel011); + typename VoxelTypeTraits::DensityType voxel100Den = convertToDensity(voxel100); + typename VoxelTypeTraits::DensityType voxel101Den = convertToDensity(voxel101); + typename VoxelTypeTraits::DensityType voxel110Den = convertToDensity(voxel110); + typename VoxelTypeTraits::DensityType voxel111Den = convertToDensity(voxel111); //FIXME - should accept all float parameters, but GCC complains? double dummy; @@ -129,10 +129,10 @@ namespace PolyVox sz = modf(sz, &dummy); //Note: Consider what should happen if src and dest have different voxel types. - typename VoxelTypeTraits::DensityType uInterpolatedDensity = trilinearlyInterpolate(voxel000Den,voxel100Den,voxel010Den,voxel110Den,voxel001Den,voxel101Den,voxel011Den,voxel111Den,sx,sy,sz); + typename VoxelTypeTraits::DensityType uInterpolatedDensity = trilinearlyInterpolate(voxel000Den,voxel100Den,voxel010Den,voxel110Den,voxel001Den,voxel101Den,voxel011Den,voxel111Den,sx,sy,sz); //Note: Consider what should happen if src and dest have different voxel types. - DestVolumeType::VoxelType result; + typename DestVolumeType::VoxelType result; //result.setDensity(uInterpolatedDensity); result = uInterpolatedDensity; diff --git a/library/PolyVoxCore/source/Density.cpp b/library/PolyVoxCore/source/Density.cpp index 3131c504..81a124bb 100644 --- a/library/PolyVoxCore/source/Density.cpp +++ b/library/PolyVoxCore/source/Density.cpp @@ -26,7 +26,7 @@ freely, subject to the following restrictions: namespace PolyVox { template<> - typename VoxelTypeTraits::DensityType convertToDensity(Density8 voxel) + VoxelTypeTraits::DensityType convertToDensity(Density8 voxel) { return voxel.getDensity(); } diff --git a/library/bindings/CMakeLists.txt b/library/bindings/CMakeLists.txt index 598637fd..f69f6077 100644 --- a/library/bindings/CMakeLists.txt +++ b/library/bindings/CMakeLists.txt @@ -1,8 +1,8 @@ find_package(SWIG) -if(SWIG_FOUND) +find_package(PythonLibs) +if(SWIG_FOUND AND PYTHONLIBS_FOUND) include(${SWIG_USE_FILE}) - find_package(PythonLibs) include_directories(${PYTHON_INCLUDE_PATH}) include_directories(${PolyVoxCore_SOURCE_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include/PolyVoxCore) link_directories(${PolyVoxCore_BINARY_DIR}) diff --git a/library/bindings/PolyVoxCore.i b/library/bindings/PolyVoxCore.i index db4d46a2..b4270caf 100644 --- a/library/bindings/PolyVoxCore.i +++ b/library/bindings/PolyVoxCore.i @@ -17,18 +17,18 @@ %include "stdint.i" %include "std_vector.i" -%include "Material.i" -%include "Density.i" %include "Vector.i" -%include "Region.i" -%include "SimpleVolume.i" -%include "TypeDef.i" +//%include "Material.i" +//%include "Density.i" +//%include "Region.i" +//%include "SimpleVolume.i" +//%include "TypeDef.i" //%include "SubArray.i" //%include "Array.i" -%include "VertexTypes.i" -%include "SurfaceMesh.i" +//%include "VertexTypes.i" +//%include "SurfaceMesh.i" //%include "SimpleVolumeSampler.i" -%include "SurfaceExtractor.i" +//%include "SurfaceExtractor.i" //%include "CubicSurfaceExtractor.i" //%include "CubicSurfaceExtractorWithNormals.i" //%include "MeshDecimator.i" \ No newline at end of file diff --git a/library/bindings/Vector.i b/library/bindings/Vector.i index 297ffe8f..e8d808d6 100644 --- a/library/bindings/Vector.i +++ b/library/bindings/Vector.i @@ -1,7 +1,6 @@ %module Vector %{ #include "Vector.h" -//#include "PolyVoxCore/include/PolyVoxCStdInt.h" %} %include "Vector.h" diff --git a/tests/TestAStarPathfinder.cpp b/tests/TestAStarPathfinder.cpp index 45838bde..f17ec049 100644 --- a/tests/TestAStarPathfinder.cpp +++ b/tests/TestAStarPathfinder.cpp @@ -40,7 +40,7 @@ bool testVoxelValidator(const VolumeType* volData, const Vector3DInt32& v3dPos) return false; } - VolumeType::VoxelType voxel = volData->getVoxelAt(v3dPos); + typename VolumeType::VoxelType voxel = volData->getVoxelAt(v3dPos); if(voxel != 0) { return false;