Renamed WrapMode::None (and others) to avoid conflict with Python reserved word 'None'.

This commit is contained in:
Daviw Williams
2013-06-13 16:49:02 +02:00
parent dc7c7eb552
commit 1e55859107
12 changed files with 70 additions and 70 deletions

View File

@ -40,7 +40,7 @@ bool testVoxelValidator(const VolumeType* volData, const Vector3DInt32& v3dPos)
return false;
}
typename VolumeType::VoxelType voxel = volData->getVoxel(v3dPos, WrapModes::None); // FIXME use templatised version of getVoxel(), but watch out for Linux compile issues.
typename VolumeType::VoxelType voxel = volData->getVoxel(v3dPos, WrapModes::Validate); // FIXME use templatised version of getVoxel(), but watch out for Linux compile issues.
if(voxel != 0)
{
return false;

View File

@ -86,11 +86,11 @@ public:
}
/// Gets a voxel at the position given by <tt>x,y,z</tt> coordinates
VoxelType getVoxel(int32_t uXPos, int32_t uYPos, int32_t uZPos, WrapMode eWrapMode = WrapModes::None, VoxelType tBorder = VoxelType()) const
VoxelType getVoxel(int32_t uXPos, int32_t uYPos, int32_t uZPos, WrapMode eWrapMode = WrapModes::Validate, VoxelType tBorder = VoxelType()) const
{
switch(eWrapMode)
{
case WrapModes::None:
case WrapModes::Validate:
{
if(this->m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos)) == false)
{
@ -121,7 +121,7 @@ public:
return tBorder;
}
}
case WrapModes::DontCheck:
case WrapModes::AssumeValid:
{
return mVolumeData[uXPos][uYPos][uZPos];
}
@ -135,7 +135,7 @@ public:
}
/// Gets a voxel at the position given by a 3D vector
VoxelType getVoxel(const Vector3DInt32& v3dPos, WrapMode eWrapMode = WrapModes::None, VoxelType tBorder = VoxelType()) const
VoxelType getVoxel(const Vector3DInt32& v3dPos, WrapMode eWrapMode = WrapModes::Validate, VoxelType tBorder = VoxelType()) const
{
return getVoxel(v3dPos.getX(), v3dPos.getY(), v3dPos.getZ(), eWrapMode, tBorder);
}