Linux compile fixes.

This commit is contained in:
p265186 2012-10-08 17:02:03 +02:00
parent 92ca1048b3
commit 816fadbde1
3 changed files with 8 additions and 10 deletions

View File

@ -31,11 +31,9 @@ freely, subject to the following restrictions:
#include "PolyVoxCore/Region.h" #include "PolyVoxCore/Region.h"
#include "PolyVoxCore/Raycast.h" #include "PolyVoxCore/Raycast.h"
#if defined(_MSC_VER) //These two should not be here!
//These two should not be here! #include "PolyVoxCore/Material.h"
#include "PolyVoxCore/Material.h" #include "PolyVoxCore/SimpleVolume.h"
#include "PolyVoxCore/SimpleVolume.h"
#endif
#include <algorithm> #include <algorithm>

View File

@ -106,7 +106,7 @@ namespace PolyVox
tSrcVoxel /= 27; tSrcVoxel /= 27;
//tSrcVoxel.setDensity(uDensity); //tSrcVoxel.setDensity(uDensity);
m_pVolDst->setVoxelAt(iSrcX, iSrcY, iSrcZ, static_cast<DstVolumeType::VoxelType>(tSrcVoxel)); m_pVolDst->setVoxelAt(iSrcX, iSrcY, iSrcZ, static_cast<typename DstVolumeType::VoxelType>(tSrcVoxel));
} }
} }
} }
@ -138,9 +138,9 @@ namespace PolyVox
} }
} }
RawVolume<AccumulationType>::Sampler satVolumeIter(&satVolume); typename RawVolume<AccumulationType>::Sampler satVolumeIter(&satVolume);
IteratorController<RawVolume<AccumulationType>::Sampler> satIterCont; IteratorController<typename RawVolume<AccumulationType>::Sampler> satIterCont;
satIterCont.m_regValid = Region(satLowerCorner, satUpperCorner); satIterCont.m_regValid = Region(satLowerCorner, satUpperCorner);
satIterCont.m_Iter = &satVolumeIter; satIterCont.m_Iter = &satVolumeIter;
satIterCont.reset(); satIterCont.reset();
@ -239,7 +239,7 @@ namespace PolyVox
uint32_t sideLength = border * 2 + 1; uint32_t sideLength = border * 2 + 1;
AccumulationType average = sum / (sideLength*sideLength*sideLength); AccumulationType average = sum / (sideLength*sideLength*sideLength);
m_pVolDst->setVoxelAt(iDstX, iDstY, iDstZ, static_cast<DstVolumeType::VoxelType>(average)); m_pVolDst->setVoxelAt(iDstX, iDstY, iDstZ, static_cast<typename DstVolumeType::VoxelType>(average));
} }
} }
} }

View File

@ -55,7 +55,7 @@ namespace PolyVox
template<typename VolumeType, typename Callback> template<typename VolumeType, typename Callback>
RaycastResult raycastWithEndpoints(VolumeType* volData, const Vector3DFloat& v3dStart, const Vector3DFloat& v3dEnd, Callback& callback) 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 //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 //voxels. We actually want to define the areas as being centered on voxels (as this is