G++ compile fixes.
This commit is contained in:
@ -27,6 +27,8 @@ freely, subject to the following restrictions:
|
||||
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
|
||||
#include "PolyVoxImpl/TypeDef.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
///This class represents a voxel storing only a density.
|
||||
@ -62,7 +64,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; }
|
||||
|
@ -65,7 +65,7 @@ namespace PolyVox
|
||||
//int32_t iDstMaxY = m_regDst.getUpperCorner().getY();
|
||||
//int32_t iDstMaxZ = m_regDst.getUpperCorner().getZ();
|
||||
|
||||
SrcVolumeType<VoxelType>::Sampler srcSampler(m_pVolSrc);
|
||||
typename SrcVolumeType<VoxelType>::Sampler srcSampler(m_pVolSrc);
|
||||
|
||||
for(int32_t iSrcZ = iSrcMinZ, iDstZ = iDstMinZ; iSrcZ <= iSrcMaxZ; iSrcZ++, iDstZ++)
|
||||
{
|
||||
@ -147,9 +147,9 @@ namespace PolyVox
|
||||
satIterCont.m_Iter = &satVolumeIter;
|
||||
satIterCont.reset();
|
||||
|
||||
SrcVolumeType<VoxelType>::Sampler srcVolumeIter(m_pVolSrc);
|
||||
typename SrcVolumeType<VoxelType>::Sampler srcVolumeIter(m_pVolSrc);
|
||||
|
||||
IteratorController<SrcVolumeType<VoxelType>::Sampler> srcIterCont;
|
||||
IteratorController<typename SrcVolumeType<VoxelType>::Sampler> srcIterCont;
|
||||
srcIterCont.m_regValid = Region(satLowerCorner, satUpperCorner);
|
||||
srcIterCont.m_Iter = &srcVolumeIter;
|
||||
srcIterCont.reset();
|
||||
|
@ -76,7 +76,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; }
|
||||
|
@ -87,7 +87,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();
|
||||
@ -136,7 +136,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();
|
||||
|
@ -100,9 +100,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 <typename VoxelType>
|
||||
|
Reference in New Issue
Block a user