From dc7c7eb552cec24357828e697ee5f3e337a6401d Mon Sep 17 00:00:00 2001 From: Daviw Williams Date: Thu, 13 Jun 2013 16:27:46 +0200 Subject: [PATCH] Removed old BoundsCheck enum. --- .../include/PolyVoxCore/BaseVolume.h | 19 ++----------------- .../include/PolyVoxCore/BaseVolume.inl | 16 ++-------------- 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.h b/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.h index 390a4a6c..315e19ec 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.h +++ b/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.h @@ -36,21 +36,6 @@ namespace PolyVox //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// More details to come... //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - namespace BoundsChecks - { - enum BoundsCheck - { - None = 0, - Full = 1, - ClampPos = 2, - BorderPos = 3 - }; - } - typedef BoundsChecks::BoundsCheck BoundsCheck; - - // Required for a trick to implement specialization of template member - // functions in template classes. See http://stackoverflow.com/a/4951057 - template struct BoundsCheckType{}; namespace WrapModes { @@ -189,9 +174,9 @@ namespace PolyVox /// Sets the value used for voxels which are outside the volume void setBorderValue(const VoxelType& tBorder); /// Sets the voxel at the position given by x,y,z coordinates - void setVoxel(int32_t uXPos, int32_t uYPos, int32_t uZPos, VoxelType tValue, BoundsCheck eBoundsCheck = BoundsChecks::Full); + void setVoxel(int32_t uXPos, int32_t uYPos, int32_t uZPos, VoxelType tValue, WrapMode eWrapMode = WrapModes::None); /// Sets the voxel at the position given by a 3D vector - void setVoxel(const Vector3DInt32& v3dPos, VoxelType tValue, BoundsCheck eBoundsCheck = BoundsChecks::Full); + void setVoxel(const Vector3DInt32& v3dPos, VoxelType tValue, WrapMode eWrapMode = WrapModes::None); /// Sets the voxel at the position given by x,y,z coordinates bool setVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos, VoxelType tValue); /// Sets the voxel at the position given by a 3D vector diff --git a/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.inl index a28eac7f..a78804ec 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/BaseVolume.inl @@ -225,9 +225,6 @@ namespace PolyVox /// \param uXPos The \c x position of the voxel /// \param uYPos The \c y position of the voxel /// \param uZPos The \c z position of the voxel - /// \param eBoundsCheck Controls whether bounds checking is performed on voxel access. It's safest to - /// set this to BoundsChecks::Full (the default), but if you are certain that the voxel you are accessing - /// is inside the volume's enclosing region then you can skip this check to gain some performance. /// \return The voxel value //////////////////////////////////////////////////////////////////////////////// template @@ -239,9 +236,6 @@ namespace PolyVox //////////////////////////////////////////////////////////////////////////////// /// \param v3dPos The 3D position of the voxel - /// \param eBoundsCheck Controls whether bounds checking is performed on voxel access. It's safest to - /// set this to BoundsChecks::Full (the default), but if you are certain that the voxel you are accessing - /// is inside the volume's enclosing region then you can skip this check to gain some performance. /// \return The voxel value //////////////////////////////////////////////////////////////////////////////// template @@ -265,12 +259,9 @@ namespace PolyVox /// \param uYPos the \c y position of the voxel /// \param uZPos the \c z position of the voxel /// \param tValue the value to which the voxel will be set - /// \param eBoundsCheck Controls whether bounds checking is performed on voxel access. It's safest to - /// set this to BoundsChecks::Full (the default), but if you are certain that the voxel you are accessing - /// is inside the volume's enclosing region then you can skip this check to gain some performance. //////////////////////////////////////////////////////////////////////////////// template - void BaseVolume::setVoxel(int32_t /*uXPos*/, int32_t /*uYPos*/, int32_t /*uZPos*/, VoxelType /*tValue*/, BoundsCheck /*eBoundsCheck*/) + void BaseVolume::setVoxel(int32_t /*uXPos*/, int32_t /*uYPos*/, int32_t /*uZPos*/, VoxelType /*tValue*/, WrapMode /*eWrapMode*/) { POLYVOX_THROW(not_implemented, "You should never call the base class version of this function."); } @@ -278,12 +269,9 @@ namespace PolyVox //////////////////////////////////////////////////////////////////////////////// /// \param v3dPos the 3D position of the voxel /// \param tValue the value to which the voxel will be set - /// \param eBoundsCheck Controls whether bounds checking is performed on voxel access. It's safest to - /// set this to BoundsChecks::Full (the default), but if you are certain that the voxel you are accessing - /// is inside the volume's enclosing region then you can skip this check to gain some performance. //////////////////////////////////////////////////////////////////////////////// template - void BaseVolume::setVoxel(const Vector3DInt32& /*v3dPos*/, VoxelType /*tValue*/, BoundsCheck /*eBoundsCheck*/) + void BaseVolume::setVoxel(const Vector3DInt32& /*v3dPos*/, VoxelType /*tValue*/, WrapMode /*eWrapMode*/) { POLYVOX_THROW(not_implemented, "You should never call the base class version of this function."); }