OpenVDB 7.0.0

Classes | Public Member Functions | 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 | NodePairT

## 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 | any (const CoordBBox &bbox, bool useAccessor=false) const
| Returns true if the specified bounding box intersects any active values. More...
bool | none (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...

## Detailed Description

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

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

## ◆ any()

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

## ◆ count()

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

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

## ◆ none()

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

## ◆ update()

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

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

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

- FindActiveValues.h