Documentation of Region class.
This commit is contained in:
@ -86,22 +86,22 @@ namespace PolyVox
|
||||
/// Gets the position of the upper corner.
|
||||
Vector3DInt32 getUpperCorner(void) const;
|
||||
|
||||
/// Gets the width of the region measured in voxels
|
||||
/// Gets the width of the region measured in voxels.
|
||||
int32_t getWidthInVoxels(void) const;
|
||||
/// Gets the height of the region measured in voxels
|
||||
/// Gets the height of the region measured in voxels.
|
||||
int32_t getHeightInVoxels(void) const;
|
||||
/// Gets the depth of the region measured in voxels
|
||||
/// Gets the depth of the region measured in voxels.
|
||||
int32_t getDepthInVoxels(void) const;
|
||||
/// Gets the dimensions of the region measured in voxels
|
||||
/// Gets the dimensions of the region measured in voxels.
|
||||
Vector3DInt32 getDimensionsInVoxels(void) const;
|
||||
|
||||
/// Gets the width of the region measured in cells
|
||||
/// Gets the width of the region measured in cells.
|
||||
int32_t getWidthInCells(void) const;
|
||||
/// Gets the height of the region measured in cells
|
||||
/// Gets the height of the region measured in cells.
|
||||
int32_t getHeightInCells(void) const;
|
||||
/// Gets the depth of the region measured in cells
|
||||
/// Gets the depth of the region measured in cells.
|
||||
int32_t getDepthInCells(void) const;
|
||||
/// Gets the dimensions of the region measured in cells
|
||||
/// Gets the dimensions of the region measured in cells.
|
||||
Vector3DInt32 getDimensionsInCells(void) const;
|
||||
|
||||
/// Sets the 'x' position of the lower corner.
|
||||
@ -186,116 +186,193 @@ namespace PolyVox
|
||||
// 'inline' keyword is used for the definition rather than the declaration.
|
||||
// See also http://www.parashift.com/c++-faq-lite/inline-functions.html
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The 'x' position of the lower corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getLowerX(void) const
|
||||
{
|
||||
return m_iLowerX;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The 'y' position of the lower corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getLowerY(void) const
|
||||
{
|
||||
return m_iLowerY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The 'z' position of the lower corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getLowerZ(void) const
|
||||
{
|
||||
return m_iLowerZ;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The 'x' position of the upper corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getUpperX(void) const
|
||||
{
|
||||
return m_iUpperX;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The 'y' position of the upper corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getUpperY(void) const
|
||||
{
|
||||
return m_iUpperY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The 'z' position of the upper corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getUpperZ(void) const
|
||||
{
|
||||
return m_iUpperZ;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The position of the lower corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline Vector3DInt32 Region::getLowerCorner(void) const
|
||||
{
|
||||
return Vector3DInt32(m_iLowerX, m_iLowerY, m_iLowerZ);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The position of the upper corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline Vector3DInt32 Region::getUpperCorner(void) const
|
||||
{
|
||||
return Vector3DInt32(m_iUpperX, m_iUpperY, m_iUpperZ);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The width of the region measured in voxels.
|
||||
/// \sa getWidthInCells()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getWidthInVoxels(void) const
|
||||
{
|
||||
return getWidthInCells() + 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The height of the region measured in voxels.
|
||||
/// \sa getHeightInCells()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getHeightInVoxels(void) const
|
||||
{
|
||||
return getHeightInCells() + 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The depth of the region measured in voxels.
|
||||
/// \sa getDepthInCells()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getDepthInVoxels(void) const
|
||||
{
|
||||
return getDepthInCells() + 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The dimensions of the region measured in voxels.
|
||||
/// \sa getDimensionsInCells()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline Vector3DInt32 Region::getDimensionsInVoxels(void) const
|
||||
{
|
||||
return getDimensionsInCells() + Vector3DInt32(1, 1, 1);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The width of the region measured in cells.
|
||||
/// \sa getWidthInVoxels()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getWidthInCells(void) const
|
||||
{
|
||||
return m_iUpperX - m_iLowerX;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The height of the region measured in cells.
|
||||
/// \sa getHeightInVoxels()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getHeightInCells(void) const
|
||||
{
|
||||
return m_iUpperY - m_iLowerY;
|
||||
}
|
||||
|
||||
inline Vector3DInt32 Region::getDimensionsInCells(void) const
|
||||
{
|
||||
return Vector3DInt32(getWidthInCells(), getHeightInCells(), getDepthInCells());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The depth of the region measured in cells.
|
||||
/// \sa getDepthInVoxels()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline int32_t Region::getDepthInCells(void) const
|
||||
{
|
||||
return m_iUpperZ - m_iLowerZ;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \return The dimensions of the region measured in cells.
|
||||
/// \sa getDimensionsInVoxels()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline Vector3DInt32 Region::getDimensionsInCells(void) const
|
||||
{
|
||||
return Vector3DInt32(getWidthInCells(), getHeightInCells(), getDepthInCells());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \param iX The new 'x' position of the lower corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline void Region::setLowerX(int32_t iX)
|
||||
{
|
||||
m_iLowerX = iX;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \param iY The new 'y' position of the lower corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline void Region::setLowerY(int32_t iY)
|
||||
{
|
||||
m_iLowerY = iY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \param iZ The new 'z' position of the lower corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline void Region::setLowerZ(int32_t iZ)
|
||||
{
|
||||
m_iLowerZ = iZ;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \param iX The new 'x' position of the upper corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline void Region::setUpperX(int32_t iX)
|
||||
{
|
||||
m_iUpperX = iX;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \param iY The new 'y' position of the upper corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline void Region::setUpperY(int32_t iY)
|
||||
{
|
||||
m_iUpperY = iY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \param iZ The new 'z' position of the upper corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline void Region::setUpperZ(int32_t iZ)
|
||||
{
|
||||
m_iUpperZ = iZ;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \param v3dLowerCorner The new position of the lower corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline void Region::setLowerCorner(const Vector3DInt32& v3dLowerCorner)
|
||||
{
|
||||
m_iLowerX = v3dLowerCorner.getX();
|
||||
@ -303,6 +380,9 @@ namespace PolyVox
|
||||
m_iLowerZ = v3dLowerCorner.getZ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// \param v3dUpperCorner The new position of the upper corner.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline void Region::setUpperCorner(const Vector3DInt32& v3dUpperCorner)
|
||||
{
|
||||
m_iUpperX = v3dUpperCorner.getX();
|
||||
|
Reference in New Issue
Block a user