MeshLib Documentation
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{
16 float voxelSize = 0;
17
19
21
23 UndirectedEdgeBitSet* outSharpEdges = nullptr;
24
29
33
36 std::shared_ptr<IFastWindingNumber> fwn;
37
39 bool decimate = true;
40
43 float tinyEdgeLength = -1;
44
47
51};
52
55[[nodiscard]] MRVOXELS_API Expected<Mesh> rebuildMesh( const MeshPart& mp, const RebuildMeshSettings& settings );
56
57} //namespace MR
#define MRVOXELS_API
Definition MRVoxelsFwd.h:13
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
Definition MRCameraOrientationPlugin.h:8
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:23
@ Auto
automatic selection of the fastest method among safe options for the current mesh
tl::expected< T, E > Expected
Definition MRExpected.h:58
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:32
ProgressCallback progress
To report algorithm's progress and cancel it on user demand.
Definition MRRebuildMesh.h:46
SignDetectionModeShort signMode
Definition MRRebuildMesh.h:18
OffsetMode offsetMode
Definition MRRebuildMesh.h:20
float windingNumberThreshold
Definition MRRebuildMesh.h:28
float voxelSize
Definition MRRebuildMesh.h:16
bool decimate
whether to decimate resulting mesh
Definition MRRebuildMesh.h:39
UndirectedEdgeBitSet * outSharpEdges
if non-null then created sharp edges (only if offsetMode = OffsetMode::Sharpening) will be saved here
Definition MRRebuildMesh.h:23
float tinyEdgeLength
Definition MRRebuildMesh.h:43
std::shared_ptr< IFastWindingNumber > fwn
Definition MRRebuildMesh.h:36
std::function< void(SignDetectionMode)> onSignDetectionModeSelected
Definition MRRebuildMesh.h:50