HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT > Class Template Reference

Finds the active values in a tree which intersects a bounding box. More...

#include <FindActiveValues.h>

Classes

struct  RootChild
 

Public Types

using TileDataT = TileData< typename TreeT::ValueType >
 
using AccT = tree::ValueAccessor< const TreeT, false >
 
using RootChildType = typename TreeT::RootNodeType::ChildNodeType
 

Public Member Functions

 FindActiveValues (const TreeT &tree)
 Constructor from a const tree, which is assumed not to be modified after construction. More...
 
 ~FindActiveValues ()
 Default destructor. More...
 
void update (const TreeT &tree)
 Initiate this class with a new (or modified) tree. More...
 
bool anyActiveValues (const CoordBBox &bbox, bool useAccessor=false) const
 Returns true if the specified bounding box intersects any active values. More...
 
bool anyActiveVoxels (const CoordBBox &bbox) const
 Returns true if the specified bounding box intersects any active tiles only. More...
 
bool anyActiveTiles (const CoordBBox &bbox) const
 Returns true if the specified bounding box intersects any active tiles only. More...
 
bool noActiveValues (const CoordBBox &bbox, bool useAccessor=false) const
 Returns true if the specified bounding box does not intersect any active values. More...
 
Index64 count (const CoordBBox &bbox) const
 Returns the number of active voxels intersected by the specified bounding box. More...
 
std::vector< TileDataTactiveTiles (const CoordBBox &bbox) const
 Return a vector with bounding boxes that represents all the intersections between active tiles in the tree and the specified bounding box. More...
 
 OPENVDB_DEPRECATED_MESSAGE ("Use anyActiveValues() instead") inline bool any(const CoordBBox &bbox
 
void init (const TreeT &tree)
 
template<typename NodeT >
NodeT::NodeMaskType getBBoxMask (const CoordBBox &bbox, const NodeT *node) const
 
bool anyActiveValues (const typename TreeT::LeafNodeType *leaf, const CoordBBox &bbox) const
 
bool anyActiveVoxels (const typename TreeT::LeafNodeType *leaf, const CoordBBox &bbox) const
 
void activeTiles (const typename TreeT::LeafNodeType *, const CoordBBox &, std::vector< TileDataT > &) const
 
Index64 count (const typename TreeT::LeafNodeType *leaf, const CoordBBox &bbox) const
 
template<typename NodeT >
bool anyActiveValues (const NodeT *node, const CoordBBox &bbox) const
 
template<typename NodeT >
bool anyActiveVoxels (const NodeT *node, const CoordBBox &bbox) const
 
template<typename NodeT >
bool anyActiveTiles (const NodeT *node, const CoordBBox &bbox) const
 
template<typename NodeT >
void activeTiles (const NodeT *node, const CoordBBox &bbox, std::vector< TileDataT > &tiles) const
 
template<typename NodeT >
Index64 count (const NodeT *node, const CoordBBox &bbox) const
 

Static Public Member Functions

static bool anyActiveTiles (const typename TreeT::LeafNodeType *, const CoordBBox &)
 

Public Attributes

bool useAccessor
 
AccT mAcc
 
std::vector< TileDataTmRootTiles
 
std::vector< RootChildmRootNodes
 

Detailed Description

template<typename TreeT>
class openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >

Finds the active values in a tree which intersects a bounding box.

Two methods are provided, one that count the number of active values and one that simply tests if any active values intersect the bbox.

Warning
Tree nodes are cached by this class so it's important that the tree is not modified after this class is instantiated and before its methods are called.

Definition at line 139 of file FindActiveValues.h.

Member Typedef Documentation

template<typename TreeT>
using openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::AccT = tree::ValueAccessor<const TreeT, false>

Definition at line 220 of file FindActiveValues.h.

template<typename TreeT>
using openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::RootChildType = typename TreeT::RootNodeType::ChildNodeType

Definition at line 221 of file FindActiveValues.h.

template<typename TreeT>
using openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::TileDataT = TileData<typename TreeT::ValueType>

Definition at line 143 of file FindActiveValues.h.

Constructor & Destructor Documentation

template<typename TreeT >
openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::FindActiveValues ( const TreeT &  tree)

Constructor from a const tree, which is assumed not to be modified after construction.

Definition at line 234 of file FindActiveValues.h.

Default destructor.

Definition at line 240 of file FindActiveValues.h.

Member Function Documentation

template<typename TreeT >
std::vector< TileData< typename TreeT::ValueType > > openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::activeTiles ( const CoordBBox &  bbox) const

Return a vector with bounding boxes that represents all the intersections between active tiles in the tree and the specified bounding box.

Definition at line 361 of file FindActiveValues.h.

template<typename TreeT>
void openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::activeTiles ( const typename TreeT::LeafNodeType *  ,
const CoordBBox &  ,
std::vector< TileDataT > &   
) const
inline

Definition at line 205 of file FindActiveValues.h.

template<typename TreeT >
template<typename NodeT >
void openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::activeTiles ( const NodeT *  node,
const CoordBBox &  bbox,
std::vector< TileDataT > &  tiles 
) const

Definition at line 559 of file FindActiveValues.h.

template<typename TreeT >
bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::anyActiveTiles ( const CoordBBox &  bbox) const

Returns true if the specified bounding box intersects any active tiles only.

Definition at line 313 of file FindActiveValues.h.

template<typename TreeT>
static bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::anyActiveTiles ( const typename TreeT::LeafNodeType *  ,
const CoordBBox &   
)
inlinestatic

Definition at line 204 of file FindActiveValues.h.

template<typename TreeT >
template<typename NodeT >
bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::anyActiveTiles ( const NodeT *  node,
const CoordBBox &  bbox 
) const

Definition at line 472 of file FindActiveValues.h.

template<typename TreeT >
bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::anyActiveValues ( const CoordBBox &  bbox,
bool  useAccessor = false 
) const

Returns true if the specified bounding box intersects any active values.

Warning
Using a ValueAccessor (i.e. useAccessor = true) can improve performance for especially small bounding boxes, but at the cost of no thread-safety. So if multiple threads are calling this method concurrently use the default setting, useAccessor = false.

Definition at line 273 of file FindActiveValues.h.

template<typename TreeT>
bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::anyActiveValues ( const typename TreeT::LeafNodeType *  leaf,
const CoordBBox &  bbox 
) const
inline

Definition at line 202 of file FindActiveValues.h.

template<typename TreeT >
template<typename NodeT >
bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::anyActiveValues ( const NodeT *  node,
const CoordBBox &  bbox 
) const

Definition at line 418 of file FindActiveValues.h.

template<typename TreeT >
bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::anyActiveVoxels ( const CoordBBox &  bbox) const

Returns true if the specified bounding box intersects any active tiles only.

Definition at line 298 of file FindActiveValues.h.

template<typename TreeT >
bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::anyActiveVoxels ( const typename TreeT::LeafNodeType *  leaf,
const CoordBBox &  bbox 
) const
inline

Definition at line 455 of file FindActiveValues.h.

template<typename TreeT >
template<typename NodeT >
bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::anyActiveVoxels ( const NodeT *  node,
const CoordBBox &  bbox 
) const

Definition at line 439 of file FindActiveValues.h.

template<typename TreeT >
Index64 openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::count ( const CoordBBox &  bbox) const

Returns the number of active voxels intersected by the specified bounding box.

Definition at line 331 of file FindActiveValues.h.

template<typename TreeT >
Index64 openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::count ( const typename TreeT::LeafNodeType *  leaf,
const CoordBBox &  bbox 
) const
inline

Definition at line 493 of file FindActiveValues.h.

template<typename TreeT >
template<typename NodeT >
Index64 openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::count ( const NodeT *  node,
const CoordBBox &  bbox 
) const

Definition at line 512 of file FindActiveValues.h.

template<typename TreeT >
template<typename NodeT >
NodeT::NodeMaskType openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::getBBoxMask ( const CoordBBox &  bbox,
const NodeT *  node 
) const

Definition at line 393 of file FindActiveValues.h.

template<typename TreeT >
void openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::init ( const TreeT &  tree)

Definition at line 261 of file FindActiveValues.h.

template<typename TreeT>
bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::noActiveValues ( const CoordBBox &  bbox,
bool  useAccessor = false 
) const
inline

Returns true if the specified bounding box does not intersect any active values.

Warning
Using a ValueAccessor (i.e. useAccessor = true) can improve performance for especially small bounding boxes, but at the cost of no thread-safety. So if multiple threads are calling this method concurrently use the default setting, useAccessor = false.

Definition at line 172 of file FindActiveValues.h.

template<typename TreeT>
openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::OPENVDB_DEPRECATED_MESSAGE ( "Use anyActiveValues() instead"  ) const
template<typename TreeT >
void openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::update ( const TreeT &  tree)

Initiate this class with a new (or modified) tree.

Definition at line 246 of file FindActiveValues.h.

Member Data Documentation

template<typename TreeT>
AccT openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::mAcc

Definition at line 223 of file FindActiveValues.h.

template<typename TreeT>
std::vector<RootChild> openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::mRootNodes

Definition at line 227 of file FindActiveValues.h.

template<typename TreeT>
std::vector<TileDataT> openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::mRootTiles

Definition at line 226 of file FindActiveValues.h.

template<typename TreeT>
bool openvdb::OPENVDB_VERSION_NAME::tools::FindActiveValues< TreeT >::useAccessor
Initial value:
= false) const
{
return this->anyActiveValues(bbox, useAccessor);
}
OPENVDB_DEPRECATED_MESSAGE("Use noActiveValues() instead") inline bool none(const CoordBBox &bbox, bool useAccessor = false) const
{
return this->noActiveValues(bbox, useAccessor);
}
private:
void clear()

Definition at line 181 of file FindActiveValues.h.


The documentation for this class was generated from the following file: