getEnclosedRegion now return a const ref.

This commit is contained in:
David Williams 2012-11-27 22:53:36 +01:00
parent c98f65c9a5
commit a7d7f64554
3 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ namespace PolyVox
/// Gets the value used for voxels which are outside the volume /// Gets the value used for voxels which are outside the volume
VoxelType getBorderValue(void) const; VoxelType getBorderValue(void) const;
/// Gets a Region representing the extents of the Volume. /// Gets a Region representing the extents of the Volume.
Region getEnclosingRegion(void) const; const Region& getEnclosingRegion(void) const;
/// Gets the width of the volume in voxels. /// Gets the width of the volume in voxels.
int32_t getWidth(void) const; int32_t getWidth(void) const;
/// Gets the height of the volume in voxels. /// Gets the height of the volume in voxels.

View File

@ -84,7 +84,7 @@ namespace PolyVox
/// \return A Region representing the extent of the volume. /// \return A Region representing the extent of the volume.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> template <typename VoxelType>
Region BaseVolume<VoxelType>::getEnclosingRegion(void) const const Region& BaseVolume<VoxelType>::getEnclosingRegion(void) const
{ {
return m_regValidRegion; return m_regValidRegion;
} }

View File

@ -44,7 +44,7 @@ namespace PolyVox
MaterialDensityPair() : m_uMaterial(0), m_uDensity(0) {} MaterialDensityPair() : m_uMaterial(0), m_uDensity(0) {}
// FIXME - This is a bit odd... we need to allow the MaterialDensityPair to be initialised with a single integer // FIXME - This is a bit odd... we need to allow the MaterialDensityPair to be initialised with a single integer
// and PolyVox often initialises voxels by calling VoxelType(0). Is there a better way we should handle this? // because PolyVox often initialises voxels by calling VoxelType(0). Is there a better way we should handle this?
MaterialDensityPair(Type tValue) : m_uMaterial(tValue), m_uDensity(tValue) {} MaterialDensityPair(Type tValue) : m_uMaterial(tValue), m_uDensity(tValue) {}
MaterialDensityPair(Type uMaterial, Type uDensity) : m_uMaterial(uMaterial), m_uDensity(uDensity) {} MaterialDensityPair(Type uMaterial, Type uDensity) : m_uMaterial(uMaterial), m_uDensity(uDensity) {}