1. Volumes of Fun
  2. Untitled project
  3. PolyVox

Commits

David Williams  committed dc7c7eb

Removed old BoundsCheck enum.

  • Participants
  • Parent commits 6e8030f
  • Branches develop, feature/dualcontouring

Comments (0)

Files changed (2)

File library/PolyVoxCore/include/PolyVoxCore/BaseVolume.h

View file
 	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 	/// 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 <BoundsCheck B> struct BoundsCheckType{};
 	
 	namespace WrapModes
 	{
 		/// Sets the value used for voxels which are outside the volume
 		void setBorderValue(const VoxelType& tBorder);
 		/// Sets the voxel at the position given by <tt>x,y,z</tt> 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 <tt>x,y,z</tt> 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

File library/PolyVoxCore/include/PolyVoxCore/BaseVolume.inl

View file
 	/// \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 <typename VoxelType>
 
 	////////////////////////////////////////////////////////////////////////////////
 	/// \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 <typename VoxelType>
 	/// \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 <typename VoxelType>
-	void BaseVolume<VoxelType>::setVoxel(int32_t /*uXPos*/, int32_t /*uYPos*/, int32_t /*uZPos*/, VoxelType /*tValue*/, BoundsCheck /*eBoundsCheck*/)
+	void BaseVolume<VoxelType>::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.");
 	}
 	////////////////////////////////////////////////////////////////////////////////
 	/// \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 <typename VoxelType>
-	void BaseVolume<VoxelType>::setVoxel(const Vector3DInt32& /*v3dPos*/, VoxelType /*tValue*/, BoundsCheck /*eBoundsCheck*/)
+	void BaseVolume<VoxelType>::setVoxel(const Vector3DInt32& /*v3dPos*/, VoxelType /*tValue*/, WrapMode /*eWrapMode*/)
 	{
 		POLYVOX_THROW(not_implemented, "You should never call the base class version of this function.");
 	}