Loading...
Searching...
No Matches
LevelSetRebuild.h File Reference
`#include <openvdb/Grid.h>`
`#include <openvdb/Exceptions.h>`
`#include <openvdb/math/Math.h>`
`#include <openvdb/math/Transform.h>`
`#include <openvdb/util/NullInterrupter.h>`
`#include <openvdb/util/Util.h>`
`#include <openvdb/openvdb.h>`
`#include "VolumeToMesh.h"`
`#include "MeshToVolume.h"`
`#include <tbb/blocked_range.h>`
`#include <tbb/parallel_for.h>`
`#include <type_traits>`

Go to the source code of this file.

## Namespaces

namespace | openvdb
namespace | openvdb::v11_0
namespace | openvdb::v11_0::tools

## Macros

#define | OPENVDB_USE_ORACLE_IN_REBUILD 0

## Functions

template<class GridType >
GridType::Ptr | levelSetRebuild (const GridType &grid, float isovalue=0, float halfWidth=float(LEVEL_SET_HALF_WIDTH), const math::Transform *xform=nullptr)
| Return a new grid of type `GridType` that contains a narrow-band level set representation of an isosurface of a given grid.
template<class GridType >
GridType::Ptr | levelSetRebuild (const GridType &grid, float isovalue, float exBandWidth, float inBandWidth, const math::Transform *xform=nullptr)
| Return a new grid of type `GridType` that contains a narrow-band level set representation of an isosurface of a given grid.
template<class GridType , typename InterruptT >
GridType::Ptr | levelSetRebuild (const GridType &grid, float isovalue, float exBandWidth, float inBandWidth, const math::Transform *xform=nullptr, InterruptT *interrupter=nullptr)
| Return a new grid of type `GridType` that contains a narrow-band level set representation of an isosurface of a given grid.

## Macro Definition Documentation

## OPENVDB_USE_ORACLE_IN_REBUILD

#define OPENVDB_USE_ORACLE_IN_REBUILD 0

When rebuilding we convert from grid -> mesh -> grid. The conversion from mesh -> grid will close any internal bubbles. By using the original grid as an oracle we can set the sign of the bubbles properly. Unfortunately, when increasing resolution the rasterization of the mesh diverges too far from interpolated original grid and results in incorrect sign choices. The likely correct solution is to use a different approach for rebuilding when resolution is increasing.