Merge branch 'develop' into feature/cubiquity-version
Conflicts: library/PolyVoxCore/include/PolyVoxCore/Region.h library/PolyVoxCore/source/Region.cpp
This commit is contained in:
@ -32,7 +32,7 @@ namespace PolyVox
|
||||
{
|
||||
// Passing zero to the stream constructor guarentees it will discard all input. See
|
||||
// here http://stackoverflow.com/a/8244052 and here http://stackoverflow.com/a/6240980
|
||||
static std::ostream s_NullStream = std::ostream(0);
|
||||
static std::ostream s_NullStream(0);
|
||||
return &s_NullStream;
|
||||
}
|
||||
|
||||
|
@ -301,6 +301,23 @@ namespace PolyVox
|
||||
&& (pos >= m_iLowerZ + boundary);
|
||||
}
|
||||
|
||||
/**
|
||||
* The boundary value can be used to ensure a region is only considered to be inside
|
||||
* another Region if it is that far in in all directions. Also, the test is inclusive such
|
||||
* that a region is considered to be inside of itself.
|
||||
* \param reg The region to test.
|
||||
* \param boundary The desired boundary value.
|
||||
*/
|
||||
bool Region::containsRegion(const Region& reg, uint8_t boundary) const
|
||||
{
|
||||
return (reg.m_iUpperX <= m_iUpperX - boundary)
|
||||
&& (reg.m_iUpperY <= m_iUpperY - boundary)
|
||||
&& (reg.m_iUpperZ <= m_iUpperZ - boundary)
|
||||
&& (reg.m_iLowerX >= m_iLowerX + boundary)
|
||||
&& (reg.m_iLowerY >= m_iLowerY + boundary)
|
||||
&& (reg.m_iLowerZ >= m_iLowerZ + boundary);
|
||||
}
|
||||
|
||||
/**
|
||||
* After calling this functions, the extents of this Region are given by the intersection
|
||||
* of this Region and the one it was cropped to.
|
||||
@ -470,6 +487,7 @@ namespace PolyVox
|
||||
{
|
||||
shrink(v3dAmount.getX(), v3dAmount.getY(), v3dAmount.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* This function only returns true if the regions are really intersecting and not simply touching.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user