OpenVDB  9.0.1
Public Types | Public Member Functions | Public Attributes | List of all members
CheckDivergence< GridT, TreeIterT, DiffScheme > Struct Template Reference

Checks the divergence against a range. More...

#include <openvdb/tools/Diagnostics.h>

Public Types

using ValueType = typename GridT::ValueType
 
using ElementType = typename VecTraits< ValueType >::ElementType
 
using TileIterT = TreeIterT
 
using VoxelIterT = typename tree::IterTraits< typename TreeIterT::NodeT, typename TreeIterT::ValueIterT >::template NodeConverter< typename GridT::TreeType::LeafNodeType >::Type
 
using AccT = typename GridT::ConstAccessor
 

Public Member Functions

 CheckDivergence (const GridT &grid, const ValueType &_min, const ValueType &_max)
 Constructor taking a grid and a range to be tested against. More...
 
bool operator() (const ElementType &v) const
 Return true if the value is smaller than min or larger than max. More...
 
bool operator() (const TreeIterT &) const
 Return true if zero is outside the range. More...
 
bool operator() (const VoxelIterT &iter) const
 Return true if the divergence at a voxel location of the iterator is out of range. More...
 
std::string str () const
 Return a string describing a failed check. More...
 

Public Attributes

AccT acc
 
const ValueType invdx
 
const ValueType minVal
 
const ValueType maxVal
 

Detailed Description

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::DScheme DiffScheme = math::CD_2ND>
struct openvdb::v9_0::tools::CheckDivergence< GridT, TreeIterT, DiffScheme >

Checks the divergence against a range.

Member Typedef Documentation

using AccT = typename GridT::ConstAccessor
using TileIterT = TreeIterT
using ValueType = typename GridT::ValueType
using VoxelIterT = typename tree::IterTraits<typename TreeIterT::NodeT, typename TreeIterT::ValueIterT>::template NodeConverter< typename GridT::TreeType::LeafNodeType>::Type

Constructor & Destructor Documentation

CheckDivergence ( const GridT &  grid,
const ValueType _min,
const ValueType _max 
)
inline

Constructor taking a grid and a range to be tested against.

Member Function Documentation

bool operator() ( const ElementType v) const
inline

Return true if the value is smaller than min or larger than max.

bool operator() ( const TreeIterT &  ) const
inline

Return true if zero is outside the range.

Note
We assume that the divergence of a tile is always zero.
bool operator() ( const VoxelIterT iter) const
inline

Return true if the divergence at a voxel location of the iterator is out of range.

std::string str ( ) const
inline

Return a string describing a failed check.

Member Data Documentation

AccT acc
const ValueType invdx
const ValueType maxVal
const ValueType minVal