Removed getWidth(), getHeight(), getDepth() and width(), height(), depth() remain deprecated. These functions seem ambiguous, so users have to calculate these values themselves when they want them.

This commit is contained in:
David Williams
2011-03-16 23:14:28 +00:00
parent f887565e35
commit ef185d79a0
10 changed files with 25 additions and 54 deletions

View File

@ -135,7 +135,7 @@ namespace PolyVox
template <typename VoxelType>
int32_t Volume<VoxelType>::getWidth(void) const
{
return m_regValidRegion.getWidth();
return m_regValidRegion.getUpperCorner().getX() - m_regValidRegion.getLowerCorner().getX() + 1;
}
////////////////////////////////////////////////////////////////////////////////
@ -145,7 +145,7 @@ namespace PolyVox
template <typename VoxelType>
int32_t Volume<VoxelType>::getHeight(void) const
{
return m_regValidRegion.getHeight();
return m_regValidRegion.getUpperCorner().getY() - m_regValidRegion.getLowerCorner().getY() + 1;
}
////////////////////////////////////////////////////////////////////////////////
@ -155,7 +155,7 @@ namespace PolyVox
template <typename VoxelType>
int32_t Volume<VoxelType>::getDepth(void) const
{
return m_regValidRegion.getDepth();
return m_regValidRegion.getUpperCorner().getZ() - m_regValidRegion.getLowerCorner().getZ() + 1;
}
////////////////////////////////////////////////////////////////////////////////