OpenVDB: FindActiveValues< TreeT > Class Template Reference

OpenVDB 8.1.0

Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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< TileDataT > | 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. 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< TileDataT > | mRootTiles
std::vector< RootChild > | mRootNodes

## Detailed Description

### template<typename TreeT>
class openvdb::v8_1::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.

## Member Typedef Documentation

## ◆ AccT

using AccT = tree::ValueAccessor<const TreeT, false>

## ◆ RootChildType

using RootChildType = typename TreeT::RootNodeType::ChildNodeType

## ◆ TileDataT

using TileDataT = TileData<typename TreeT::ValueType>

## Constructor & Destructor Documentation

## ◆ FindActiveValues()

FindActiveValues | ( | const TreeT & | tree | ) |

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

## ◆ ~FindActiveValues()

~FindActiveValues

Default destructor.

## Member Function Documentation

## ◆ activeTiles() [1/3]

std::vector< TileData< typename TreeT::ValueType > > 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.

## ◆ activeTiles() [2/3]

void activeTiles | ( | const NodeT * | node,
|  | const CoordBBox & | bbox,
|  | std::vector< TileDataT > & | tiles
| ) |  | const

## ◆ activeTiles() [3/3]

void activeTiles | ( | const typename TreeT::LeafNodeType * | ,
|  | const CoordBBox & | ,
|  | std::vector< TileDataT > & |
| ) |  | const
| inline

## ◆ anyActiveTiles() [1/3]

bool anyActiveTiles | ( | const CoordBBox & | bbox | ) | const

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

## ◆ anyActiveTiles() [2/3]

bool anyActiveTiles | ( | const NodeT * | node,
|  | const CoordBBox & | bbox
| ) |  | const

## ◆ anyActiveTiles() [3/3]

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

## ◆ anyActiveValues() [1/3]

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

## ◆ anyActiveValues() [2/3]

bool anyActiveValues | ( | const NodeT * | node,
|  | const CoordBBox & | bbox
| ) |  | const

## ◆ anyActiveValues() [3/3]

bool anyActiveValues | ( | const typename TreeT::LeafNodeType * | leaf,
|  | const CoordBBox & | bbox
| ) |  | const
| inline

## ◆ anyActiveVoxels() [1/3]

bool anyActiveVoxels | ( | const CoordBBox & | bbox | ) | const

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

## ◆ anyActiveVoxels() [2/3]

bool anyActiveVoxels | ( | const NodeT * | node,
|  | const CoordBBox & | bbox
| ) |  | const

## ◆ anyActiveVoxels() [3/3]

bool anyActiveVoxels | ( | const typename TreeT::LeafNodeType * | leaf,
|  | const CoordBBox & | bbox
| ) |  | const
| inline

## ◆ count() [1/3]

Index64 count | ( | const CoordBBox & | bbox | ) | const

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

## ◆ count() [2/3]

Index64 count | ( | const NodeT * | node,
|  | const CoordBBox & | bbox
| ) |  | const

## ◆ count() [3/3]

Index64 count | ( | const typename TreeT::LeafNodeType * | leaf,
|  | const CoordBBox & | bbox
| ) |  | const
| inline

## ◆ getBBoxMask()

NodeT::NodeMaskType getBBoxMask | ( | const CoordBBox & | bbox,
|  | const NodeT * | node
| ) |  | const

## ◆ init()

void init | ( | const TreeT & | tree | ) |

## ◆ noActiveValues()

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

## ◆ OPENVDB_DEPRECATED_MESSAGE()

OPENVDB_DEPRECATED_MESSAGE | ( | "Use anyActiveValues() instead" |  | ) | const &

## ◆ update()

void update | ( | const TreeT & | tree | ) |

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

## Member Data Documentation

## ◆ mAcc

AccT mAcc

## ◆ mRootNodes

std::vector<RootChild> mRootNodes

## ◆ mRootTiles

std::vector<TileDataT> mRootTiles

## ◆ useAccessor

bool 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()
openvdb::v8_1::tools::FindActiveValues::OPENVDB_DEPRECATED_MESSAGE
OPENVDB_DEPRECATED_MESSAGE("Use anyActiveValues() instead") inline bool any(const CoordBBox &bbox
openvdb::v8_1::tools::FindActiveValues::noActiveValues
bool noActiveValues(const CoordBBox &bbox, bool useAccessor=false) const
Returns true if the specified bounding box does not intersect any active values.
Definition: FindActiveValues.h:172
openvdb::v8_1::tools::FindActiveValues::useAccessor
bool useAccessor
Definition: FindActiveValues.h:181
openvdb::v8_1::tools::FindActiveValues::anyActiveValues
bool anyActiveValues(const CoordBBox &bbox, bool useAccessor=false) const
Returns true if the specified bounding box intersects any active values.
Definition: FindActiveValues.h:273

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

- FindActiveValues.h