4 #ifndef OPENVDB_UTIL_UTIL_HAS_BEEN_INCLUDED
5 #define OPENVDB_UTIL_UTIL_HAS_BEEN_INCLUDED
72 template<
class TreeType1,
class TreeType2>
78 inline void operator()(
const typename TreeType1::LeafIter& lIter)
const
80 const Coord xyz = lIter->origin();
81 const typename TreeType2::LeafNodeType* leaf = mOtherTree->probeConstLeaf(xyz);
83 lIter->topologyIntersection(*leaf, zeroVal<typename TreeType1::ValueType>());
84 }
else if (!mOtherTree->isValueOn(xyz)) {
85 lIter->setValuesOff();
90 const TreeType2* mOtherTree;
96 template<
class TreeType1,
class TreeType2>
102 inline void operator()(
const typename TreeType1::LeafIter& lIter)
const
104 const Coord xyz = lIter->origin();
105 const typename TreeType2::LeafNodeType* leaf = mOtherTree->probeConstLeaf(xyz);
107 lIter->topologyDifference(*leaf, zeroVal<typename TreeType1::ValueType>());
108 }
else if (mOtherTree->isValueOn(xyz)) {
109 lIter->setValuesOff();
114 const TreeType2* mOtherTree;
123 template<
class TreeType1,
class TreeType2>
124 inline typename TreeType1::template ValueConverter<bool>::Type::Ptr
129 typename BoolTreeType::Ptr topologyTree(
new BoolTreeType(
143 template<
class TreeType1,
class TreeType2>
144 inline typename TreeType1::template ValueConverter<bool>::Type::Ptr
149 typename BoolTreeType::Ptr topologyTree(
new BoolTreeType(
163 #endif // OPENVDB_UTIL_UTIL_HAS_BEEN_INCLUDED
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
TreeType1::template ValueConverter< bool >::Type::Ptr leafTopologyIntersection(const TreeType1 &lhs, const TreeType2 &rhs, bool threaded=true)
Perform a boolean intersection between two leaf nodes' topology masks.
constexpr Index32 INVALID_IDX
IMATH_HOSTDEVICE constexpr int floor(T x) IMATH_NOEXCEPT
constexpr Coord COORD_OFFSETS[26]
coordinate offset table for neighboring voxels
LeafTopologyIntOp(const TreeType2 &tree)
#define OPENVDB_USE_VERSION_NAMESPACE
LeafTopologyDiffOp(const TreeType2 &tree)
Functor for use with tools::foreach() to compute the boolean difference between the value masks of co...
void operator()(const typename TreeType1::LeafIter &lIter) const
Coord nearestCoord(const Vec3d &voxelCoord)
Return voxelCoord rounded to the closest integer coordinates.
void operator()(const typename TreeType1::LeafIter &lIter) const
Functor for use with tools::foreach() to compute the boolean intersection between the value masks of ...
Defined various multi-threaded utility functions for trees.
TreeType1::template ValueConverter< bool >::Type::Ptr leafTopologyDifference(const TreeType1 &lhs, const TreeType2 &rhs, bool threaded=true)
Perform a boolean difference between two leaf nodes' topology masks.
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.