OpenVDB: FindActiveValues< TreeT > Class Template Reference

OpenVDB 13.0.0

Loading...
Searching...
No Matches
FindActiveValues< TreeT > Class Template Reference

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

`#include <openvdb/tools/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.
| ~FindActiveValues ()
| Default destructor.
void | update (const TreeT &tree)
| Initiate this class with a new (or modified) tree.
bool | anyActiveValues (const CoordBBox &bbox, bool useAccessor=false) const
| Returns true if the specified bounding box intersects any active values.
bool | anyActiveVoxels (const CoordBBox &bbox) const
| Returns true if the specified bounding box intersects any active tiles only.
bool | anyActiveTiles (const CoordBBox &bbox) const
| Returns true if the specified bounding box intersects any active tiles only.
bool | noActiveValues (const CoordBBox &bbox, bool useAccessor=false) const
| Returns true if the specified bounding box does not intersect any active values.
Index64 | count (const CoordBBox &bbox) const
| Returns the number of active voxels intersected by the specified bounding box.
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.

## Detailed Description

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

## Member Typedef Documentation

## ◆ TileDataT

template<typename TreeT>

using TileDataT = TileData<typename TreeT::ValueType>

## Constructor & Destructor Documentation

## ◆ FindActiveValues()

template<typename TreeT>

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

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

## ◆ ~FindActiveValues()

template<typename TreeT>

~FindActiveValues | ( |  | ) |

Default destructor.

## Member Function Documentation

## ◆ activeTiles()

template<typename TreeT>

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.

## ◆ anyActiveTiles()

template<typename TreeT>

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

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

## ◆ anyActiveValues()

template<typename TreeT>

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.

## ◆ anyActiveVoxels()

template<typename TreeT>

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

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

## ◆ count()

template<typename TreeT>

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

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

## ◆ noActiveValues()

template<typename TreeT>

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.

## ◆ update()

template<typename TreeT>

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

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