Optimising SurfaceExtractor.

This commit is contained in:
David Williams
2009-06-02 22:51:00 +00:00
parent 64318fb546
commit 5a99101341
5 changed files with 29 additions and 70 deletions

View File

@ -249,25 +249,6 @@ namespace PolyVox
{
return getVoxelAt(v3dPos.getX(), v3dPos.getY(), v3dPos.getZ());
}
template <typename VoxelType>
VoxelType Volume<VoxelType>::getVoxelAtWithBoundCheck(int16_t uXPos, int16_t uYPos, int16_t uZPos) const
{
if((uXPos >=0) && (uXPos < m_uWidth) && (uYPos >= 0) && (uYPos < m_uHeight) && (uZPos >= 0) && (uZPos < m_uDepth))
{
return getVoxelAt(uXPos, uYPos, uZPos);
}
else
{
return 0;
}
}
template <typename VoxelType>
VoxelType Volume<VoxelType>::getVoxelAtWithBoundCheck(const Vector3DInt16& v3dPos) const
{
return getVoxelAtWithBoundCheck(v3dPos.getX(), v3dPos.getY(), v3dPos.getZ());
}
#pragma endregion
#pragma region Setters