MeshLib Documentation
Loading...
Searching...
No Matches
MRMeshRelax.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
4#include "MRRelaxParams.h"
5
6namespace MR
7{
8
12
14{
17
19 const VertScalars *weights = nullptr;
20};
21
24MRMESH_API bool relax( Mesh& mesh, const MeshRelaxParams& params = {}, ProgressCallback cb = {} );
25
28[[nodiscard]] MRMESH_API Vector3f vertexPosEqualNeiAreas( const Mesh& mesh, VertId v, bool noShrinkage );
29
36
40
44MRMESH_API bool relaxKeepVolume( Mesh& mesh, const MeshRelaxParams& params = {}, ProgressCallback cb = {} );
45
53
57MRMESH_API bool relaxApprox( Mesh& mesh, const MeshApproxRelaxParams& params = {}, ProgressCallback cb = {} );
58
60MRMESH_API void removeSpikes( Mesh & mesh, int maxIterations, float minSumAngle, const VertBitSet * region = nullptr );
61
66MRMESH_API void smoothRegionBoundary( Mesh & mesh, const FaceBitSet & regionFaces, int numIters = 4 );
67
69MRMESH_API void hardSmoothTetrahedrons( Mesh & mesh, const VertBitSet *region = nullptr );
70
72
73}
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
MRMESH_API bool relaxKeepVolume(Mesh &mesh, const MeshRelaxParams &params={}, ProgressCallback cb={})
MRMESH_API void hardSmoothTetrahedrons(Mesh &mesh, const VertBitSet *region=nullptr)
move all region vertices with exactly three neighbor vertices in the center of the neighbors
MRMESH_API bool relax(Mesh &mesh, const MeshRelaxParams &params={}, ProgressCallback cb={})
MRMESH_API void smoothRegionBoundary(Mesh &mesh, const FaceBitSet &regionFaces, int numIters=4)
MRMESH_API bool relaxApprox(Mesh &mesh, const MeshApproxRelaxParams &params={}, ProgressCallback cb={})
MRMESH_API Vector3f vertexPosEqualNeiAreas(const Mesh &mesh, VertId v, bool noShrinkage)
MRMESH_API void removeSpikes(Mesh &mesh, int maxIterations, float minSumAngle, const VertBitSet *region=nullptr)
applies at most given number of relaxation iterations the spikes detected by given threshold
MRMESH_API bool equalizeTriAreas(Mesh &mesh, const MeshEqualizeTriAreasParams &params={}, ProgressCallback cb={})
Definition MRCameraOrientationPlugin.h:8
RelaxApproxType
Definition MRRelaxParams.h:36
Definition MRMeshRelax.h:47
RelaxApproxType type
Definition MRMeshRelax.h:51
float surfaceDilateRadius
Definition MRMeshRelax.h:50
Definition MRMeshRelax.h:31
bool noShrinkage
Definition MRMeshRelax.h:34
Definition MRMeshRelax.h:14
const VertScalars * weights
weight for each vertex. By default, all the vertices have equal weights.
Definition MRMeshRelax.h:19
bool hardSmoothTetrahedrons
move all region vertices with exactly three neighbor vertices in the center of the neighbors
Definition MRMeshRelax.h:16
Definition MRMesh/MRMesh.h:23
Definition MRRelaxParams.h:12