Removed old BoundsCheck enum.
This commit is contained in:
parent
6e8030f4b5
commit
dc7c7eb552
@ -36,21 +36,6 @@ namespace PolyVox
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/// More details to come...
|
/// 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
|
namespace WrapModes
|
||||||
{
|
{
|
||||||
@ -189,9 +174,9 @@ namespace PolyVox
|
|||||||
/// Sets the value used for voxels which are outside the volume
|
/// Sets the value used for voxels which are outside the volume
|
||||||
void setBorderValue(const VoxelType& tBorder);
|
void setBorderValue(const VoxelType& tBorder);
|
||||||
/// Sets the voxel at the position given by <tt>x,y,z</tt> coordinates
|
/// 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
|
/// 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
|
/// 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);
|
bool setVoxelAt(int32_t uXPos, int32_t uYPos, int32_t uZPos, VoxelType tValue);
|
||||||
/// Sets the voxel at the position given by a 3D vector
|
/// Sets the voxel at the position given by a 3D vector
|
||||||
|
@ -225,9 +225,6 @@ namespace PolyVox
|
|||||||
/// \param uXPos The \c x position of the voxel
|
/// \param uXPos The \c x position of the voxel
|
||||||
/// \param uYPos The \c y position of the voxel
|
/// \param uYPos The \c y position of the voxel
|
||||||
/// \param uZPos The \c z 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
|
/// \return The voxel value
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
template <typename VoxelType>
|
template <typename VoxelType>
|
||||||
@ -239,9 +236,6 @@ namespace PolyVox
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// \param v3dPos The 3D position of the voxel
|
/// \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
|
/// \return The voxel value
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
template <typename VoxelType>
|
template <typename VoxelType>
|
||||||
@ -265,12 +259,9 @@ namespace PolyVox
|
|||||||
/// \param uYPos the \c y position of the voxel
|
/// \param uYPos the \c y position of the voxel
|
||||||
/// \param uZPos the \c z 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 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>
|
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.");
|
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 v3dPos the 3D position of the voxel
|
||||||
/// \param tValue the value to which the voxel will be set
|
/// \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>
|
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.");
|
POLYVOX_THROW(not_implemented, "You should never call the base class version of this function.");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user