OpenVDB  3.2.0
Public Types | Public Member Functions | Public Attributes | List of all members
CheckNormGrad< GridT, TreeIterT, GradScheme > Struct Template Reference

Checks the norm of the gradient against a range, i.e. $|\nabla\phi|\in[min,max]$. More...

#include <Diagnostics.h>

Public Types

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

Public Member Functions

 BOOST_STATIC_ASSERT (boost::is_floating_point< ValueType >::value)
 
 CheckNormGrad (const GridT &grid, const ValueType &_min, const ValueType &_max)
 Constructor taking a grid and a range to be tested against. More...
 
 CheckNormGrad (const CheckNormGrad &other)
 
bool operator() (const ValueType &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 norm of the gradient 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 invdx2
 
const ValueType minVal2
 
const ValueType maxVal2
 

Detailed Description

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
struct openvdb::v3_2_0::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >

Checks the norm of the gradient against a range, i.e. $|\nabla\phi|\in[min,max]$.

Note
Internally the test is performed as $|\nabla\phi|^2\in[min^2,max^2]$ for optimization reasons.

Member Typedef Documentation

§ AccT

typedef GridT::ConstAccessor AccT

§ TileIterT

typedef TreeIterT TileIterT

§ ValueType

typedef GridT::ValueType ValueType

§ VoxelIterT

typedef tree::IterTraits<typename TreeIterT::NodeT, typename TreeIterT::ValueIterT>::template NodeConverter<typename GridT::TreeType::LeafNodeType>::Type VoxelIterT

Constructor & Destructor Documentation

§ CheckNormGrad() [1/2]

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

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

§ CheckNormGrad() [2/2]

CheckNormGrad ( const CheckNormGrad< GridT, TreeIterT, GradScheme > &  other)
inline

Member Function Documentation

§ BOOST_STATIC_ASSERT()

BOOST_STATIC_ASSERT ( boost::is_floating_point< ValueType >::value  )

§ operator()() [1/3]

bool operator() ( const ValueType v) const
inline

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

§ operator()() [2/3]

bool operator() ( const TreeIterT &  ) const
inline

Return true if zero is outside the range.

Note
We assume that the norm of the gradient of a tile is always zero.

§ operator()() [3/3]

bool operator() ( const VoxelIterT iter) const
inline

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

§ str()

std::string str ( ) const
inline

Return a string describing a failed check.

Member Data Documentation

§ acc

AccT acc

§ invdx2

const ValueType invdx2

§ maxVal2

const ValueType maxVal2

§ minVal2

const ValueType minVal2

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