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 >
 

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...
 

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 140 of file FindActiveValues.h.

Member Typedef Documentation

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

Definition at line 144 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 226 of file FindActiveValues.h.

Default destructor.

Definition at line 232 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 353 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 305 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 265 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 290 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 323 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 173 of file FindActiveValues.h.

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 238 of file FindActiveValues.h.


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