Renamed Region::erode() to Region::shrink() and renamed Region::dilate() to Region::grow.

This commit is contained in:
Daviw Williams 2012-11-27 16:49:19 +01:00
parent 312a3def68
commit 61cd1d3a29
2 changed files with 39 additions and 39 deletions

View File

@ -155,19 +155,19 @@ namespace PolyVox
/// Crops the extents of this Region accoring to another Region. /// Crops the extents of this Region accoring to another Region.
void cropTo(const Region& other); void cropTo(const Region& other);
/// Enlarges this region by the amount specified. /// Grows this region by the amount specified.
void dilate(int32_t iAmount); void grow(int32_t iAmount);
/// Enlarges this region by the amounts specified. /// Grows this region by the amounts specified.
void dilate(int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ); void grow(int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ);
/// Enlarges this region by the amounts specified. /// Grows this region by the amounts specified.
void dilate(const Vector3DInt32& v3dAmount); void grow(const Vector3DInt32& v3dAmount);
/// Shrinks this region by the amount specified. /// Shrinks this region by the amount specified.
void erode(int32_t iAmount); void shrink(int32_t iAmount);
/// Shrinks this region by the amounts specified. /// Shrinks this region by the amounts specified.
void erode(int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ); void shrink(int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ);
/// Shrinks this region by the amounts specified. /// Shrinks this region by the amounts specified.
void erode(const Vector3DInt32& v3dAmount); void shrink(const Vector3DInt32& v3dAmount);
/// Tests whether all components of the upper corner are at least /// Tests whether all components of the upper corner are at least
/// as great as the corresponding components of the lower corner. /// as great as the corresponding components of the lower corner.

View File

@ -287,11 +287,11 @@ namespace PolyVox
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// The same amount of dilation is applied in all directions. Negative dilations /// The same amount of growth is applied in all directions. Negative growth
/// are possible but you should prefer the erode() function for clarity. /// is possible but you should prefer the shrink() function for clarity.
/// \param iAmount The amount to dilate by. /// \param iAmount The amount to grow by.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void Region::dilate(int32_t iAmount) void Region::grow(int32_t iAmount)
{ {
m_iLowerX -= iAmount; m_iLowerX -= iAmount;
m_iLowerY -= iAmount; m_iLowerY -= iAmount;
@ -303,13 +303,13 @@ namespace PolyVox
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// The dilation can be specified seperatly for each direction. Negative dilations /// The amount can be specified seperatly for each direction. Negative growth
/// are possible but you should prefer the erode() function for clarity. /// is possible but you should prefer the shrink() function for clarity.
/// \param iAmountX The amount to dilate by in 'x'. /// \param iAmountX The amount to grow by in 'x'.
/// \param iAmountY The amount to dilate by in 'y'. /// \param iAmountY The amount to grow by in 'y'.
/// \param iAmountZ The amount to dilate by in 'z'. /// \param iAmountZ The amount to grow by in 'z'.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void Region::dilate(int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ) void Region::grow(int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ)
{ {
m_iLowerX -= iAmountX; m_iLowerX -= iAmountX;
m_iLowerY -= iAmountY; m_iLowerY -= iAmountY;
@ -321,21 +321,21 @@ namespace PolyVox
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// The dilation can be specified seperatly for each direction. Negative dilations /// The amount can be specified seperatly for each direction. Negative growth
/// are possible but you should prefer the erode() function for clarity. /// is possible but you should prefer the shrink() function for clarity.
/// \param v3dAmount The amount to dilate by (one components for each direction). /// \param v3dAmount The amount to grow by (one component for each direction).
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void Region::dilate(const Vector3DInt32& v3dAmount) void Region::grow(const Vector3DInt32& v3dAmount)
{ {
dilate(v3dAmount.getX(), v3dAmount.getY(), v3dAmount.getZ()); grow(v3dAmount.getX(), v3dAmount.getY(), v3dAmount.getZ());
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// The same amount of erosion is applied in all directions. Negative erosions /// The same amount of shrinkage is applied in all directions. Negative shrinkage
/// are possible but you should prefer the dilate() function for clarity. /// is possible but you should prefer the grow() function for clarity.
/// \param iAmount The amount to erode by. /// \param iAmount The amount to shrink by.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void Region::erode(int32_t iAmount) void Region::shrink(int32_t iAmount)
{ {
m_iLowerX += iAmount; m_iLowerX += iAmount;
m_iLowerY += iAmount; m_iLowerY += iAmount;
@ -347,13 +347,13 @@ namespace PolyVox
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// The erosion can be specified seperatly for each direction. Negative erosions /// The amount can be specified seperatly for each direction. Negative shrinkage
/// are possible but you should prefer the dilate() function for clarity. /// is possible but you should prefer the grow() function for clarity.
/// \param iAmountX The amount to erode by in 'x'. /// \param iAmountX The amount to shrink by in 'x'.
/// \param iAmountY The amount to erode by in 'y'. /// \param iAmountY The amount to shrink by in 'y'.
/// \param iAmountZ The amount to erode by in 'z'. /// \param iAmountZ The amount to shrink by in 'z'.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void Region::erode(int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ) void Region::shrink(int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ)
{ {
m_iLowerX += iAmountX; m_iLowerX += iAmountX;
m_iLowerY += iAmountY; m_iLowerY += iAmountY;
@ -365,13 +365,13 @@ namespace PolyVox
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// The erosion can be specified seperatly for each direction. Negative erosions /// The amount can be specified seperatly for each direction. Negative shrinkage
/// are possible but you should prefer the dilate() function for clarity. /// is possible but you should prefer the grow() function for clarity.
/// \param v3dAmount The amount to erode by (one components for each direction). /// \param v3dAmount The amount to shrink by (one component for each direction).
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void Region::erode(const Vector3DInt32& v3dAmount) void Region::shrink(const Vector3DInt32& v3dAmount)
{ {
erode(v3dAmount.getX(), v3dAmount.getY(), v3dAmount.getZ()); shrink(v3dAmount.getX(), v3dAmount.getY(), v3dAmount.getZ());
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////