OpenVDB: CheckMagnitude< GridT, TreeIterT > Struct Template Reference

OpenVDB 10.0.1

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
CheckMagnitude< GridT, TreeIterT > Struct Template Reference

Check that the magnitude of a value, a, is close to a fixed magnitude, b, given a fixed tolerance c. That is | |a| - |b| | <= c. More...

`#include <openvdb/tools/Diagnostics.h>`

## Public Types
using | ElementType = typename VecTraits< typename GridT::ValueType >::ElementType
using | TileIterT = TreeIterT
using | VoxelIterT = typename tree::IterTraits< typename TreeIterT::NodeT, typename TreeIterT::ValueIterT > ::template NodeConverter< typename GridT::TreeType::LeafNodeType >::Type

## Public Member Functions
| CheckMagnitude (const ElementType &a, const ElementType &t=math::Tolerance< ElementType >::value())
| Default constructor.
bool | operator() (const ElementType &v) const
template<typename T >
std::enable_if< VecTraits< T >::IsVec, bool >::type | operator() (const T &v) const
| Return true if any of the vector components are infinite.
bool | operator() (const TreeIterT &iter) const
| Return true if the tile at the iterator location is infinite.
bool | operator() (const VoxelIterT &iter) const
| Return true if the tile at the iterator location is infinite.
std::string | str () const
| Return a string describing a failed check.

## Public Attributes
const ElementType | absVal
const ElementType | tolVal

## Detailed Description

template<typename GridT, typename TreeIterT = typename GridT::ValueOffCIter>
struct openvdb::v10_0::tools::CheckMagnitude< GridT, TreeIterT >

Check that the magnitude of a value, a, is close to a fixed magnitude, b, given a fixed tolerance c. That is | |a| - |b| | <= c.

## Member Typedef Documentation

## ◆ ElementType

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>

using ElementType = typename VecTraits<typename GridT::ValueType>::ElementType

## ◆ TileIterT

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>

using TileIterT = TreeIterT

## ◆ VoxelIterT

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>

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

## Constructor & Destructor Documentation

## ◆ CheckMagnitude()

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>

CheckMagnitude | ( | const ElementType & | a,
|  | const ElementType & | t = `math::Tolerance<ElementType>::value()`
| ) |  |
| inline

Default constructor.

## Member Function Documentation

## ◆ operator()() [1/4]

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>

bool operator() | ( | const ElementType & | v | ) | const
| inline

Return true if the magnitude of the value is not approximately equal to totVal.

## ◆ operator()() [2/4]

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>
template<typename T >

std::enable_if< VecTraits< T >::IsVec, bool >::type operator() | ( | const T & | v | ) | const
| inline

Return true if any of the vector components are infinite.

## ◆ operator()() [3/4]

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>

bool operator() | ( | const TreeIterT & | iter | ) | const
| inline

Return true if the tile at the iterator location is infinite.

## ◆ operator()() [4/4]

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>

bool operator() | ( | const VoxelIterT & | iter | ) | const
| inline

Return true if the tile at the iterator location is infinite.

## ◆ str()

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>

std::string str | ( |  | ) | const
| inline

Return a string describing a failed check.

## Member Data Documentation

## ◆ absVal

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>

const ElementType absVal

## ◆ tolVal

template<typename GridT , typename TreeIterT = typename GridT::ValueOffCIter>

const ElementType tolVal