MeshLib C++ Docs
Loading...
Searching...
No Matches
MRVDBConversions.h File Reference
#include "MRVoxelsFwd.h"
#include "MRMesh/MRMeshPart.h"
#include "MRMesh/MRProgressCallback.h"
#include "MRMesh/MRAffineXf3.h"
#include "MRMesh/MRExpected.h"
#include "MRMesh/MRBox.h"
#include <climits>
#include <string>
#include <optional>

Go to the source code of this file.

Classes

struct  MR::MeshToVolumeParams
 Parameters structure for meshToVolume function. More...
struct  MR::GridToMeshSettings
 parameters of OpenVDB Grid to Mesh conversion using Dual Marching Cubes algorithm More...
struct  MR::MakeSignedByWindingNumberSettings
struct  MR::DoubleOffsetSettings

Namespaces

namespace  MR
 Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).

Functions

FloatGrid MR::meshToLevelSet (const MeshPart &mp, const AffineXf3f &xf, const Vector3f &voxelSize, float surfaceOffset=3, ProgressCallback cb={})
FloatGrid MR::meshToDistanceField (const MeshPart &mp, const AffineXf3f &xf, const Vector3f &voxelSize, float surfaceOffset=3, ProgressCallback cb={})
void MR::evalGridMinMax (const FloatGrid &grid, float &min, float &max)
 eval min max value from FloatGrid
Expected< VdbVolume > MR::meshToDistanceVdbVolume (const MeshPart &mp, const MeshToVolumeParams &params={})
Expected< VdbVolume > MR::meshToVolume (const MeshPart &mp, const MeshToVolumeParams &params={})
VdbVolume MR::floatGridToVdbVolume (FloatGrid grid)
 fills VdbVolume data from FloatGrid (does not fill voxels size, cause we expect it outside)
FloatGrid MR::simpleVolumeToDenseGrid (const SimpleVolume &simpleVolume, float background=0.0f, ProgressCallback cb={})
VdbVolume MR::simpleVolumeToVdbVolume (const SimpleVolumeMinMax &simpleVolume, ProgressCallback cb={})
 set the simpleVolume.min as the background value
VdbVolume MR::functionVolumeToVdbVolume (const FunctionVolume &functoinVolume, ProgressCallback cb={})
void MR::putSimpleVolumeInDenseGrid (FloatGrid &grid, const Vector3i &minCoord, const SimpleVolume &simpleVolume, ProgressCallback cb={})
 Copy given simpleVolume into the grid, starting at minCoord Uses multithreaded copying, so the function is not thread safe. The overloads taking openvdb::FloatGrid and its Accessor are declared in MRVDBFloatGrid.h.
Expected< SimpleVolumeMinMax > MR::vdbVolumeToSimpleVolume (const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), ProgressCallback cb={})
Expected< SimpleVolumeMinMax > MR::vdbVolumeToSimpleVolumeNorm (const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), std::optional< MinMaxf > sourceScale={}, ProgressCallback cb={})
Expected< SimpleVolumeMinMaxU16 > MR::vdbVolumeToSimpleVolumeU16 (const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), std::optional< MinMaxf > sourceScale={}, ProgressCallback cb={})
Expected< Mesh > MR::gridToMesh (const FloatGrid &grid, const GridToMeshSettings &settings)
 converts OpenVDB Grid into mesh using Dual Marching Cubes algorithm
Expected< Mesh > MR::gridToMesh (FloatGrid &&grid, const GridToMeshSettings &settings)
Expected< void > MR::makeSignedByWindingNumber (FloatGrid &grid, const Vector3f &voxelSize, const Mesh &refMesh, const MakeSignedByWindingNumberSettings &settings)
 set signs for unsigned distance field grid using generalized winding number computed at voxel grid point from refMesh
Expected< Mesh > MR::doubleOffsetVdb (const MeshPart &mp, const DoubleOffsetSettings &settings)