Renamed x(), y(), and z() to getX(), getY(), and getZ()
This commit is contained in:
@ -36,31 +36,31 @@ namespace PolyVox
|
||||
|
||||
bool Region::containsPoint(const Vector3DFloat& pos, float boundary) const
|
||||
{
|
||||
return (pos.x() <= m_v3dUpperCorner.x() - boundary)
|
||||
&& (pos.y() <= m_v3dUpperCorner.y() - boundary)
|
||||
&& (pos.z() <= m_v3dUpperCorner.z() - boundary)
|
||||
&& (pos.x() >= m_v3dLowerCorner.x() + boundary)
|
||||
&& (pos.y() >= m_v3dLowerCorner.y() + boundary)
|
||||
&& (pos.z() >= m_v3dLowerCorner.z() + boundary);
|
||||
return (pos.getX() <= m_v3dUpperCorner.getX() - boundary)
|
||||
&& (pos.getY() <= m_v3dUpperCorner.getY() - boundary)
|
||||
&& (pos.getZ() <= m_v3dUpperCorner.getZ() - boundary)
|
||||
&& (pos.getX() >= m_v3dLowerCorner.getX() + boundary)
|
||||
&& (pos.getY() >= m_v3dLowerCorner.getY() + boundary)
|
||||
&& (pos.getZ() >= m_v3dLowerCorner.getZ() + boundary);
|
||||
}
|
||||
|
||||
bool Region::containsPoint(const Vector3DInt32& pos, boost::uint8_t boundary) const
|
||||
{
|
||||
return (pos.x() <= m_v3dUpperCorner.x() - boundary)
|
||||
&& (pos.y() <= m_v3dUpperCorner.y() - boundary)
|
||||
&& (pos.z() <= m_v3dUpperCorner.z() - boundary)
|
||||
&& (pos.x() >= m_v3dLowerCorner.x() + boundary)
|
||||
&& (pos.y() >= m_v3dLowerCorner.y() + boundary)
|
||||
&& (pos.z() >= m_v3dLowerCorner.z() + boundary);
|
||||
return (pos.getX() <= m_v3dUpperCorner.getX() - boundary)
|
||||
&& (pos.getY() <= m_v3dUpperCorner.getY() - boundary)
|
||||
&& (pos.getZ() <= m_v3dUpperCorner.getZ() - boundary)
|
||||
&& (pos.getX() >= m_v3dLowerCorner.getX() + boundary)
|
||||
&& (pos.getY() >= m_v3dLowerCorner.getY() + boundary)
|
||||
&& (pos.getZ() >= m_v3dLowerCorner.getZ() + boundary);
|
||||
}
|
||||
|
||||
void Region::cropTo(const Region& other)
|
||||
{
|
||||
m_v3dLowerCorner.setX((std::max)(m_v3dLowerCorner.x(), other.m_v3dLowerCorner.x()));
|
||||
m_v3dLowerCorner.setY((std::max)(m_v3dLowerCorner.y(), other.m_v3dLowerCorner.y()));
|
||||
m_v3dLowerCorner.setZ((std::max)(m_v3dLowerCorner.z(), other.m_v3dLowerCorner.z()));
|
||||
m_v3dUpperCorner.setX((std::min)(m_v3dUpperCorner.x(), other.m_v3dUpperCorner.x()));
|
||||
m_v3dUpperCorner.setY((std::min)(m_v3dUpperCorner.y(), other.m_v3dUpperCorner.y()));
|
||||
m_v3dUpperCorner.setZ((std::min)(m_v3dUpperCorner.z(), other.m_v3dUpperCorner.z()));
|
||||
m_v3dLowerCorner.setX((std::max)(m_v3dLowerCorner.getX(), other.m_v3dLowerCorner.getX()));
|
||||
m_v3dLowerCorner.setY((std::max)(m_v3dLowerCorner.getY(), other.m_v3dLowerCorner.getY()));
|
||||
m_v3dLowerCorner.setZ((std::max)(m_v3dLowerCorner.getZ(), other.m_v3dLowerCorner.getZ()));
|
||||
m_v3dUpperCorner.setX((std::min)(m_v3dUpperCorner.getX(), other.m_v3dUpperCorner.getX()));
|
||||
m_v3dUpperCorner.setY((std::min)(m_v3dUpperCorner.getY(), other.m_v3dUpperCorner.getY()));
|
||||
m_v3dUpperCorner.setZ((std::min)(m_v3dUpperCorner.getZ(), other.m_v3dUpperCorner.getZ()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user