Class that performs various types of checks on fog volumes.
More...
#include <openvdb/tools/Diagnostics.h>
|
using | ValueType = typename GridType::ValueType |
|
using | MaskType = typename GridType::template ValueConverter<bool>::Type |
|
|
| CheckFogVolume (const GridType &grid) |
|
MaskType::ConstPtr | mask () const |
| Return a boolean mask of all the values (i.e. tiles and/or voxels) that have failed one or more checks.
|
|
MaskType::Ptr | mask () |
|
Index64 | valueCount () const |
| Return the number of values (i.e. background, tiles or voxels) that have failed one or more checks.
|
|
Index64 | failureCount () const |
| Return total number of failed checks.
|
|
const GridType & | grid () const |
| Return a const reference to the grid.
|
|
void | clear () |
| Clear the mask and error counter.
|
|
std::string | checkClassType () const |
| Return a nonempty message if the grid's class is a level set.
|
|
std::string | checkBackground () const |
| Return a nonempty message if the background value is not zero.
|
|
std::string | checkFinite (bool updateMask=false) |
| Return a nonempty message if any of the values are not finite. i.e. NaN or inf.
|
|
std::string | checkInactiveValues (bool updateMask=false) |
| Return a nonempty message if any of the inactive values are not zero.
|
|
std::string | checkRange (bool updateMask=false) |
| Return a nonempty message if the active voxel values are out-of-range, i.e. not in the range [0,1].
|
|
std::string | check (size_t n=6, bool updateMask=false) |
| Return a nonempty message if an error or issue is detected. Only runs tests with a number lower than or equal to n, where:
|
|
|
static std::string | checkValueType () |
| Return a nonempty message if the grid's value type is a floating point.
|
|
template<class GridType>
class openvdb::v12_0::tools::CheckFogVolume< GridType >
Class that performs various types of checks on fog volumes.
- Note
- The most common usage is to simply call CheckFogVolume::check()
◆ MaskType
template<class GridType>
using MaskType = typename GridType::template ValueConverter<bool>::Type |
◆ ValueType
template<class GridType>
using ValueType = typename GridType::ValueType |
◆ CheckFogVolume()
◆ check()
template<class GridType>
std::string check |
( |
size_t | n = 6, |
|
|
bool | updateMask = false ) |
|
inline |
Return a nonempty message if an error or issue is detected. Only runs tests with a number lower than or equal to n, where:
Fast checks 1: value type is floating point 2: has FOG volume class type 3: background value is zero
Slower checks 4: all the values are finite, i.e not NaN or infinite 5: inactive values are zero 6: active values are in the range [0,1]
◆ checkBackground()
template<class GridType>
std::string checkBackground |
( |
| ) |
const |
|
inline |
Return a nonempty message if the background value is not zero.
- Note
- Small run-time overhead
◆ checkClassType()
template<class GridType>
std::string checkClassType |
( |
| ) |
const |
|
inline |
Return a nonempty message if the grid's class is a level set.
- Note
- Small run-time overhead
◆ checkFinite()
template<class GridType>
std::string checkFinite |
( |
bool | updateMask = false | ) |
|
|
inline |
Return a nonempty message if any of the values are not finite. i.e. NaN or inf.
- Note
- Medium run-time overhead
◆ checkInactiveValues()
template<class GridType>
std::string checkInactiveValues |
( |
bool | updateMask = false | ) |
|
|
inline |
Return a nonempty message if any of the inactive values are not zero.
- Note
- Medium run-time overhead
◆ checkRange()
template<class GridType>
std::string checkRange |
( |
bool | updateMask = false | ) |
|
|
inline |
Return a nonempty message if the active voxel values are out-of-range, i.e. not in the range [0,1].
- Note
- Medium run-time overhead
◆ checkValueType()
template<class GridType>
static std::string checkValueType |
( |
| ) |
|
|
inlinestatic |
Return a nonempty message if the grid's value type is a floating point.
- Note
- No run-time overhead
◆ clear()
Clear the mask and error counter.
◆ failureCount()
Return total number of failed checks.
- Note
- If only one check was performed and the mask was updated failureCount equals valueCount.
◆ grid()
template<class GridType>
const GridType & grid |
( |
| ) |
const |
|
inline |
Return a const reference to the grid.
◆ mask() [1/2]
◆ mask() [2/2]
template<class GridType>
MaskType::ConstPtr mask |
( |
| ) |
const |
|
inline |
Return a boolean mask of all the values (i.e. tiles and/or voxels) that have failed one or more checks.
◆ valueCount()
Return the number of values (i.e. background, tiles or voxels) that have failed one or more checks.