From 555ddc47a5964eb88599ba05b0e01ee6c3731418 Mon Sep 17 00:00:00 2001 From: David Williams Date: Sun, 24 Jul 2011 12:26:43 +0100 Subject: [PATCH] Compile fixes for G++. --- .../include/PolyVoxCore/RawVolume.inl | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl index 08b8eeef..ab0a95aa 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.inl @@ -47,7 +47,7 @@ namespace PolyVox ( const Region& regValid ) - :Volume(regValid) + :Volume(regValid) { //Create a volume of the right size. resize(regValid); @@ -72,18 +72,18 @@ namespace PolyVox template VoxelType RawVolume::getVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos) const { - if(m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos))) + if(Volume::m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos))) { return m_pData [ uXPos + - uYPos * getWidth() + - uZPos * getWidth() * getHeight() + uYPos * Volume::getWidth() + + uZPos * Volume::getWidth() * Volume::getHeight() ]; } else { - return getBorderValue(); + return Volume::getBorderValue(); } } @@ -107,13 +107,13 @@ namespace PolyVox template bool RawVolume::setVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos, VoxelType tValue) { - assert(m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos))); + assert(Volume::m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos))); m_pData [ uXPos + - uYPos * getWidth() + - uZPos * getWidth() * getHeight() + uYPos * Volume::getWidth() + + uZPos * Volume::getWidth() * Volume::getHeight() ] = tValue; //Return true to indicate that we modified a voxel. @@ -137,20 +137,20 @@ namespace PolyVox template void RawVolume::resize(const Region& regValidRegion) { - m_regValidRegion = regValidRegion; + Volume::m_regValidRegion = regValidRegion; //Ensure dimensions of the specified Region are valid - assert(getWidth() > 0); - assert(getHeight() > 0); - assert(getDepth() > 0); + assert(Volume::getWidth() > 0); + assert(Volume::getHeight() > 0); + assert(Volume::getDepth() > 0); //Create the data - m_pData = new VoxelType[getWidth() * getHeight()* getDepth()]; + m_pData = new VoxelType[Volume::getWidth() * Volume::getHeight()* Volume::getDepth()]; //Other properties we might find useful later - m_uLongestSideLength = (std::max)((std::max)(getWidth(),getHeight()),getDepth()); - m_uShortestSideLength = (std::min)((std::min)(getWidth(),getHeight()),getDepth()); - m_fDiagonalLength = sqrtf(static_cast(getWidth() * getWidth() + getHeight() * getHeight() + getDepth() * getDepth())); + Volume::m_uLongestSideLength = (std::max)((std::max)(Volume::getWidth(),Volume::getHeight()),Volume::getDepth()); + Volume::m_uShortestSideLength = (std::min)((std::min)(Volume::getWidth(),Volume::getHeight()),Volume::getDepth()); + Volume::m_fDiagonalLength = sqrtf(static_cast(Volume::getWidth() * Volume::getWidth() + Volume::getHeight() * Volume::getHeight() + Volume::getDepth() * Volume::getDepth())); } //////////////////////////////////////////////////////////////////////////////// @@ -159,7 +159,7 @@ namespace PolyVox template uint32_t RawVolume::calculateSizeInBytes(void) { - return getWidth() * getHeight() * getDepth() * sizeof(VoxelType); + return Volume::getWidth() * Volume::getHeight() * Volume::getDepth() * sizeof(VoxelType); } }