21 const Vector3f& voxelSize,
float surfaceOffset = 3,
28 const Vector3f& voxelSize,
float surfaceOffset = 3,
65 const VdbVolume& vdbVolume,
const Box3i& activeBox = Box3i(),
ProgressCallback cb = {} );
72 const VdbVolume& vdbVolume,
const Box3i& activeBox = Box3i(), std::optional<MinMaxf> sourceScale = {},
ProgressCallback cb = {} );
79 const VdbVolume& vdbVolume,
const Box3i& activeBox = Box3i(), std::optional<MinMaxf> sourceScale = {},
ProgressCallback cb = {} );
112 std::shared_ptr<IFastWindingNumber>
fwn;
144 std::shared_ptr<IFastWindingNumber>
fwn;
#define MRVOXELS_API
Definition MRVoxelsFwd.h:13
represents a 3-dimentional float-typed vector
Definition MRDotNet/MRVector3.h:8
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:571
Definition MRCameraOrientationPlugin.h:8
MRVOXELS_API Expected< SimpleVolumeMinMax > vdbVolumeToSimpleVolume(const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), ProgressCallback cb={})
MRVOXELS_API Expected< SimpleVolumeMinMaxU16 > vdbVolumeToSimpleVolumeU16(const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), std::optional< MinMaxf > sourceScale={}, ProgressCallback cb={})
MRVOXELS_API FloatGrid meshToDistanceField(const MeshPart &mp, const AffineXf3f &xf, const Vector3f &voxelSize, float surfaceOffset=3, ProgressCallback cb={})
MRVOXELS_API VdbVolume floatGridToVdbVolume(FloatGrid grid)
MRVOXELS_API VdbVolume simpleVolumeToVdbVolume(const SimpleVolumeMinMax &simpleVolume, ProgressCallback cb={})
std::shared_ptr< OpenVdbFloatGrid > FloatGrid
Definition MRVoxelsFwd.h:25
tl::expected< T, E > Expected
Definition MRExpected.h:58
MRVOXELS_API void evalGridMinMax(const FloatGrid &grid, float &min, float &max)
MRVOXELS_API Expected< SimpleVolumeMinMax > vdbVolumeToSimpleVolumeNorm(const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), std::optional< MinMaxf > sourceScale={}, ProgressCallback cb={})
MRVOXELS_API Expected< Mesh > doubleOffsetVdb(const MeshPart &mp, const DoubleOffsetSettings &settings)
MRVOXELS_API Expected< VdbVolume > meshToVolume(const Mesh &mesh, const MeshToVolumeParams ¶ms={})
MRVOXELS_API Expected< Mesh > gridToMesh(const FloatGrid &grid, const GridToMeshSettings &settings)
converts OpenVDB Grid into mesh using Dual Marching Cubes algorithm
MRVOXELS_API FloatGrid meshToLevelSet(const MeshPart &mp, const AffineXf3f &xf, const Vector3f &voxelSize, float surfaceOffset=3, ProgressCallback cb={})
MRVOXELS_API Expected< void > 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 po...
MRVOXELS_API FloatGrid simpleVolumeToDenseGrid(const SimpleVolume &simpleVolume, ProgressCallback cb={})
Definition MRVDBConversions.h:130
std::shared_ptr< IFastWindingNumber > fwn
defines particular implementation of IFastWindingNumber interface that will compute windings....
Definition MRVDBConversions.h:144
float voxelSize
the size of voxel in intermediate voxel grid representation
Definition MRVDBConversions.h:132
float offsetB
the amount of second offset
Definition MRVDBConversions.h:138
float windingNumberThreshold
Definition MRVDBConversions.h:148
ProgressCallback progress
to report algorithm's progress and to cancel it
Definition MRVDBConversions.h:154
float adaptivity
in [0; 1] - ratio of combining small triangles into bigger ones (curvature can be lost on high values...
Definition MRVDBConversions.h:141
float offsetA
the amount of first offset
Definition MRVDBConversions.h:135
float windingNumberBeta
determines the precision of fast approximation: the more the better, minimum value is 1
Definition MRVDBConversions.h:151
parameters of OpenVDB Grid to Mesh conversion using Dual Marching Cubes algorithm
Definition MRVDBConversions.h:83
bool relaxDisorientedTriangles
Definition MRVDBConversions.h:94
float adaptivity
adaptivity - [0.0;1.0] ratio of combining small triangles into bigger ones (curvature can be lost on ...
Definition MRVDBConversions.h:89
int maxVertices
if the mesh exceeds this number of vertices, an error returns
Definition MRVDBConversions.h:93
int maxFaces
if the mesh exceeds this number of faces, an error returns
Definition MRVDBConversions.h:91
ProgressCallback cb
to receive progress and request cancellation
Definition MRVDBConversions.h:96
Vector3f voxelSize
the size of each voxel in the grid
Definition MRVDBConversions.h:85
float isoValue
layer of grid with this value would be converted in mesh; isoValue can be negative only in level set ...
Definition MRVDBConversions.h:87
Definition MRVDBConversions.h:107
ProgressCallback progress
to report algorithm's progress and to cancel it
Definition MRVDBConversions.h:122
float windingNumberThreshold
Definition MRVDBConversions.h:116
std::shared_ptr< IFastWindingNumber > fwn
defines particular implementation of IFastWindingNumber interface that will compute windings....
Definition MRVDBConversions.h:112
float windingNumberBeta
determines the precision of fast approximation: the more the better, minimum value is 1
Definition MRVDBConversions.h:119
AffineXf3f meshToGridXf
defines the mapping from mesh reference from to grid reference frame
Definition MRVDBConversions.h:109
Definition MRMesh/MRMeshPart.h:11
Definition MRVDBConversions.h:33
AffineXf3f worldXf
Definition MRVDBConversions.h:42
AffineXf3f * outXf
Definition MRVDBConversions.h:43
Type
Definition MRVDBConversions.h:36
Vector3f voxelSize
Definition MRVDBConversions.h:41
enum MR::MeshToVolumeParams::Type Unsigned
float surfaceOffset
Definition MRVDBConversions.h:40
ProgressCallback cb
Definition MRVDBConversions.h:44
Definition MRMesh/MRMesh.h:23
static constexpr Vector3 diagonal(float a) noexcept
Definition MRMesh/MRVector3.h:32