MeshLib C++ Docs
Loading...
Searching...
No Matches
MRRebuildMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRVoxelsFwd.h"
4#include "MRMesh/MRMeshPart.h"
5#include "MRMesh/MRExpected.h"
6#include "MRMesh/MREnums.h"
8
9namespace MR
10{
11
13{
19 bool preSubdivide = true;
20
23 float voxelSize = 0;
24
26
29
31
33 UndirectedEdgeBitSet* outSharpEdges = nullptr;
34
39
43
46 std::shared_ptr<IFastWindingNumber> fwn;
47
49 bool decimate = true;
50
53 float tinyEdgeLength = -1;
54
57
61};
62
65[[nodiscard]] MRVOXELS_API Expected<Mesh> rebuildMesh( const MeshPart& mp, const RebuildMeshSettings& settings );
66
67} //namespace MR
#define MRVOXELS_API
Definition MRVoxels/MRVoxelsFwd.h:13
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:626
SignDetectionMode
how to determine the sign of distances from a mesh
Definition MRMesh/MRSignDetectionMode.h:10
SignDetectionModeShort
how to determine the sign of distances from a mesh, short version including auto-detection
Definition MRMesh/MRSignDetectionMode.h:34
@ Auto
automatic selection of the fastest method among safe options for the current mesh
tl::expected< T, E > Expected
Definition MRExpected.h:59
OffsetMode
Definition MREnums.h:38
@ Standard
create mesh using standard marching cubes implemented in MeshLib
MRVOXELS_API Expected< Mesh > rebuildMesh(const MeshPart &mp, const RebuildMeshSettings &settings)
Definition MRRebuildMesh.h:13
float windingNumberBeta
Definition MRRebuildMesh.h:42
ProgressCallback progress
To report algorithm's progress and cancel it on user demand.
Definition MRRebuildMesh.h:56
SignDetectionModeShort signMode
Definition MRRebuildMesh.h:25
OffsetMode offsetMode
Definition MRRebuildMesh.h:30
float windingNumberThreshold
Definition MRRebuildMesh.h:38
float voxelSize
Definition MRRebuildMesh.h:23
bool decimate
whether to decimate resulting mesh
Definition MRRebuildMesh.h:49
bool closeHolesInHoleWindingNumber
whether to construct closed mesh in signMode = SignDetectionModeShort::HoleWindingNumber
Definition MRRebuildMesh.h:28
UndirectedEdgeBitSet * outSharpEdges
if non-null then created sharp edges (only if offsetMode = OffsetMode::Sharpening) will be saved here
Definition MRRebuildMesh.h:33
float tinyEdgeLength
Definition MRRebuildMesh.h:53
std::shared_ptr< IFastWindingNumber > fwn
Definition MRRebuildMesh.h:46
bool preSubdivide
Definition MRRebuildMesh.h:19
std::function< void(SignDetectionMode)> onSignDetectionModeSelected
Definition MRRebuildMesh.h:60