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{
13
14
16{
22 bool preSubdivide = true;
23
26 float voxelSize = 0;
27
29
32
34
36 UndirectedEdgeBitSet* outSharpEdges = nullptr;
37
42
46
49 std::shared_ptr<IFastWindingNumber> fwn;
50
55
57 bool decimate = true;
58
61 float tinyEdgeLength = -1;
62
65
69};
70
73[[nodiscard]] MRVOXELS_API Expected<Mesh> rebuildMesh( const MeshPart& mp, const RebuildMeshSettings& settings );
74
76{
78 float voxelSize = 0;
79
84
86 bool decimate = true;
87
90 float tinyEdgeLength = -1;
91
93 UndirectedEdgeBitSet* sharpEdges = nullptr;
94};
95
100
101}
#define MRVOXELS_API
see explanation in MRMesh/MRMeshFwd.h
Definition MRVoxelsFwd.h:14
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:758
float windingNumberBeta
Definition MRRebuildMesh.h:45
ProgressCallback progress
To report algorithm's progress and cancel it on user demand.
Definition MRRebuildMesh.h:64
SignDetectionMode
how to determine the sign of distances from a mesh
Definition MRSignDetectionMode.h:13
SignDetectionModeShort
how to determine the sign of distances from a mesh, short version including auto-detection
Definition MRSignDetectionMode.h:37
SignDetectionModeShort signMode
Definition MRRebuildMesh.h:28
OffsetMode offsetMode
Definition MRRebuildMesh.h:33
float windingNumberThreshold
Definition MRRebuildMesh.h:41
float voxelSize
Definition MRRebuildMesh.h:26
Expected< void > postprocessMeshFromVoxels(Mesh &mesh, const MeshFromVoxelsPostProcessingParams &params, const ProgressCallback &progress={})
float tinyEdgeLength
Definition MRRebuildMesh.h:90
float voxelSize
The size of voxel that was used for mesh creation, must be set.
Definition MRRebuildMesh.h:78
bool decimate
whether to decimate resulting mesh
Definition MRRebuildMesh.h:86
tl::expected< T, E > Expected
Definition MRExpected.h:31
bool decimate
whether to decimate resulting mesh
Definition MRRebuildMesh.h:57
bool closeHolesInHoleWindingNumber
whether to construct closed mesh in signMode = SignDetectionModeShort::HoleWindingNumber
Definition MRRebuildMesh.h:31
int reduceAngleNumIters
Definition MRRebuildMesh.h:54
Expected< Mesh > rebuildMesh(const MeshPart &mp, const RebuildMeshSettings &settings)
OffsetMode
Definition MREnums.h:77
UndirectedEdgeBitSet * outSharpEdges
if non-null then created sharp edges (only if offsetMode = OffsetMode::Sharpening) will be saved here
Definition MRRebuildMesh.h:36
int reduceAngleNumIters
Definition MRRebuildMesh.h:83
float tinyEdgeLength
Definition MRRebuildMesh.h:61
UndirectedEdgeBitSet * sharpEdges
sharp edges that are maintained during post-processing
Definition MRRebuildMesh.h:93
std::shared_ptr< IFastWindingNumber > fwn
Definition MRRebuildMesh.h:49
bool preSubdivide
Definition MRRebuildMesh.h:22
std::function< void(SignDetectionMode)> onSignDetectionModeSelected
Definition MRRebuildMesh.h:68
@ Auto
automatic selection of the fastest method among safe options for the current mesh
Definition MRSignDetectionMode.h:38
@ Standard
create mesh using standard marching cubes implemented in MeshLib
Definition MREnums.h:79
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRRebuildMesh.h:76
Definition MRMesh.h:23
Definition MRRebuildMesh.h:16