21 const Vector3f& voxelSize,
float surfaceOffset = 3,
28 const Vector3f& voxelSize,
float surfaceOffset = 3,
82template <
typename AccessorOrGr
id>
84 AccessorOrGrid& gridAccessor,
85 const Vector3i& minCoord,
const SimpleVolume& simpleVolume,
ProgressCallback cb = {}
91 const VdbVolume& vdbVolume,
const Box3i& activeBox = Box3i(),
ProgressCallback cb = {} );
98 const VdbVolume& vdbVolume,
const Box3i& activeBox = Box3i(), std::optional<MinMaxf> sourceScale = {},
ProgressCallback cb = {} );
105 const VdbVolume& vdbVolume,
const Box3i& activeBox = Box3i(), std::optional<MinMaxf> sourceScale = {},
ProgressCallback cb = {} );
138 std::shared_ptr<IFastWindingNumber>
fwn;
170 std::shared_ptr<IFastWindingNumber>
fwn;
#define MRVOXELS_API
Definition MRVoxels/MRVoxelsFwd.h:13
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:626
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 MRVoxels/MRVoxelsFwd.h:25
MRVOXELS_API Expected< VdbVolume > meshToVolume(const MeshPart &mp, const MeshToVolumeParams ¶ms={})
tl::expected< T, E > Expected
Definition MRExpected.h:59
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< VdbVolume > meshToDistanceVdbVolume(const MeshPart &mp, const MeshToVolumeParams ¶ms={})
MRVOXELS_API FloatGrid simpleVolumeToDenseGrid(const SimpleVolume &simpleVolume, float background=0.0f, ProgressCallback cb={})
MRVOXELS_API Expected< Mesh > doubleOffsetVdb(const MeshPart &mp, const DoubleOffsetSettings &settings)
MRVOXELS_API void putSimpleVolumeInDenseGrid(AccessorOrGrid &gridAccessor, const Vector3i &minCoord, const SimpleVolume &simpleVolume, ProgressCallback cb={})
Copy given simpleVolume into the grid, starting at minCoord Instantiated for AccessorOrGrid in { open...
MRVOXELS_API VdbVolume functionVolumeToVdbVolume(const FunctionVolume &functoinVolume, ProgressCallback cb={})
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...
Definition MRVoxels/MRVDBConversions.h:156
std::shared_ptr< IFastWindingNumber > fwn
defines particular implementation of IFastWindingNumber interface that will compute windings....
Definition MRVoxels/MRVDBConversions.h:170
float voxelSize
the size of voxel in intermediate voxel grid representation
Definition MRVoxels/MRVDBConversions.h:158
float offsetB
the amount of second offset
Definition MRVoxels/MRVDBConversions.h:164
float windingNumberThreshold
Definition MRVoxels/MRVDBConversions.h:174
ProgressCallback progress
to report algorithm's progress and to cancel it
Definition MRVoxels/MRVDBConversions.h:180
float adaptivity
in [0; 1] - ratio of combining small triangles into bigger ones (curvature can be lost on high values...
Definition MRVoxels/MRVDBConversions.h:167
float offsetA
the amount of first offset
Definition MRVoxels/MRVDBConversions.h:161
float windingNumberBeta
determines the precision of fast approximation: the more the better, minimum value is 1
Definition MRVoxels/MRVDBConversions.h:177
parameters of OpenVDB Grid to Mesh conversion using Dual Marching Cubes algorithm
Definition MRVoxels/MRVDBConversions.h:109
bool relaxDisorientedTriangles
Definition MRVoxels/MRVDBConversions.h:120
float adaptivity
adaptivity - [0.0;1.0] ratio of combining small triangles into bigger ones (curvature can be lost on ...
Definition MRVoxels/MRVDBConversions.h:115
int maxVertices
if the mesh exceeds this number of vertices, an error returns
Definition MRVoxels/MRVDBConversions.h:119
int maxFaces
if the mesh exceeds this number of faces, an error returns
Definition MRVoxels/MRVDBConversions.h:117
ProgressCallback cb
to receive progress and request cancellation
Definition MRVoxels/MRVDBConversions.h:122
Vector3f voxelSize
the size of each voxel in the grid
Definition MRVoxels/MRVDBConversions.h:111
float isoValue
layer of grid with this value would be converted in mesh; isoValue can be negative only in level set ...
Definition MRVoxels/MRVDBConversions.h:113
Definition MRVoxels/MRVDBConversions.h:133
ProgressCallback progress
to report algorithm's progress and to cancel it
Definition MRVoxels/MRVDBConversions.h:148
float windingNumberThreshold
Definition MRVoxels/MRVDBConversions.h:142
std::shared_ptr< IFastWindingNumber > fwn
defines particular implementation of IFastWindingNumber interface that will compute windings....
Definition MRVoxels/MRVDBConversions.h:138
float windingNumberBeta
determines the precision of fast approximation: the more the better, minimum value is 1
Definition MRVoxels/MRVDBConversions.h:145
AffineXf3f meshToGridXf
defines the mapping from mesh reference from to grid reference frame
Definition MRVoxels/MRVDBConversions.h:135
Definition MRVoxels/MRVDBConversions.h:33
AffineXf3f worldXf
Definition MRVoxels/MRVDBConversions.h:42
AffineXf3f * outXf
Definition MRVoxels/MRVDBConversions.h:43
Type
Definition MRVoxels/MRVDBConversions.h:36
Vector3f voxelSize
Definition MRVoxels/MRVDBConversions.h:41
enum MR::MeshToVolumeParams::Type Unsigned
float surfaceOffset
Definition MRVoxels/MRVDBConversions.h:40
ProgressCallback cb
Definition MRVoxels/MRVDBConversions.h:44
Definition MRMesh/MRMesh.h:23