MeshLib C++ Docs
Loading...
Searching...
No Matches
MRUniteManyMeshes.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3#include "MRMesh.h"
4#include "MRExpected.h"
5#include <string>
6
7namespace MR
8{
11{
12 Remove,
13 Merge,
14 Union
15};
16
19{
21 bool useRandomShifts{ false };
22
26 bool fixDegenerations{ false };
27
30 float maxAllowedError{ 1e-5f };
31
33 unsigned int randomShiftsSeed{ 0 };
34
36 FaceBitSet* newFaces{ nullptr };
37
41
43 bool mergeOnFail{ false };
44
48 bool forceCut = false;
49
51};
52
53// Computes the surface of objects' union each of which is defined by its own surface mesh
54// - merge non intersecting meshes first
55// - unite merged groups
56MRMESH_API Expected<Mesh> uniteManyMeshes( const std::vector<const Mesh*>& meshes,
57 const UniteManyMeshesParams& params = {} );
58
59}
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:663
Definition MRCameraOrientationPlugin.h:8
NestedComponenetsMode
Mode of processing components.
Definition MRUniteManyMeshes.h:11
@ Remove
Default: separate nested meshes and remove them, just like union operation should do,...
@ Merge
merge nested meshes, useful if input meshes are components of single object
MRMESH_API Expected< Mesh > uniteManyMeshes(const std::vector< const Mesh * > &meshes, const UniteManyMeshesParams &params={})
tl::expected< T, E > Expected
Definition MRExpected.h:25
Parameters structure for uniteManyMeshes function.
Definition MRUniteManyMeshes.h:19
bool fixDegenerations
Definition MRUniteManyMeshes.h:26
NestedComponenetsMode nestedComponentsMode
Definition MRUniteManyMeshes.h:40
bool mergeOnFail
If set - merges meshes instead of booleaning it if boolean operation fails.
Definition MRUniteManyMeshes.h:43
unsigned int randomShiftsSeed
Seed that is used for random shifts.
Definition MRUniteManyMeshes.h:33
float maxAllowedError
Definition MRUniteManyMeshes.h:30
ProgressCallback progressCb
Definition MRUniteManyMeshes.h:50
bool forceCut
Definition MRUniteManyMeshes.h:48
bool useRandomShifts
Apply random shift to each mesh, to prevent degenerations on coincident surfaces.
Definition MRUniteManyMeshes.h:21
FaceBitSet * newFaces
If set, the bitset will store new faces created by boolean operations.
Definition MRUniteManyMeshes.h:36