From 816fadbde18689c7655b71e69a62b4fa6fa7ba07 Mon Sep 17 00:00:00 2001 From: p265186 Date: Mon, 8 Oct 2012 17:02:03 +0200 Subject: [PATCH] Linux compile fixes. --- .../include/PolyVoxCore/AmbientOcclusionCalculator.h | 8 +++----- library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl | 8 ++++---- library/PolyVoxCore/include/PolyVoxCore/Raycast.inl | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.h b/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.h index 2170ea60..840cd37a 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.h +++ b/library/PolyVoxCore/include/PolyVoxCore/AmbientOcclusionCalculator.h @@ -31,11 +31,9 @@ freely, subject to the following restrictions: #include "PolyVoxCore/Region.h" #include "PolyVoxCore/Raycast.h" -#if defined(_MSC_VER) - //These two should not be here! - #include "PolyVoxCore/Material.h" - #include "PolyVoxCore/SimpleVolume.h" -#endif +//These two should not be here! +#include "PolyVoxCore/Material.h" +#include "PolyVoxCore/SimpleVolume.h" #include diff --git a/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl b/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl index d643982d..21a0091c 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LowPassFilter.inl @@ -106,7 +106,7 @@ namespace PolyVox tSrcVoxel /= 27; //tSrcVoxel.setDensity(uDensity); - m_pVolDst->setVoxelAt(iSrcX, iSrcY, iSrcZ, static_cast(tSrcVoxel)); + m_pVolDst->setVoxelAt(iSrcX, iSrcY, iSrcZ, static_cast(tSrcVoxel)); } } } @@ -138,9 +138,9 @@ namespace PolyVox } } - RawVolume::Sampler satVolumeIter(&satVolume); + typename RawVolume::Sampler satVolumeIter(&satVolume); - IteratorController::Sampler> satIterCont; + IteratorController::Sampler> satIterCont; satIterCont.m_regValid = Region(satLowerCorner, satUpperCorner); satIterCont.m_Iter = &satVolumeIter; satIterCont.reset(); @@ -239,7 +239,7 @@ namespace PolyVox uint32_t sideLength = border * 2 + 1; AccumulationType average = sum / (sideLength*sideLength*sideLength); - m_pVolDst->setVoxelAt(iDstX, iDstY, iDstZ, static_cast(average)); + m_pVolDst->setVoxelAt(iDstX, iDstY, iDstZ, static_cast(average)); } } } diff --git a/library/PolyVoxCore/include/PolyVoxCore/Raycast.inl b/library/PolyVoxCore/include/PolyVoxCore/Raycast.inl index b0d61170..ca24dbae 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Raycast.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/Raycast.inl @@ -55,7 +55,7 @@ namespace PolyVox template RaycastResult raycastWithEndpoints(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dEnd, Callback& callback) { - VolumeType::Sampler sampler(volData); + typename VolumeType::Sampler sampler(volData); //The doRaycast function is assuming that it is iterating over the areas defined between //voxels. We actually want to define the areas as being centered on voxels (as this is