MeshLib
 
Loading...
Searching...
No Matches
MRMeshDelone.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
5#include <cfloat>
6
7namespace MR
8{
9
11{
13 float maxDeviationAfterFlip = FLT_MAX;
15 float maxAngleChange = FLT_MAX;
18 float criticalTriAspectRatio = FLT_MAX;
20 const FaceBitSet* region = nullptr;
23};
24
29
35[[nodiscard]] MRMESH_API bool checkDeloneQuadrangle( const Vector3d& a, const Vector3d& b, const Vector3d& c, const Vector3d& d, double maxAngleChange = DBL_MAX );
37[[nodiscard]] MRMESH_API bool checkDeloneQuadrangle( const Vector3f& a, const Vector3f& b, const Vector3f& c, const Vector3f& d, float maxAngleChange = FLT_MAX );
38
42[[nodiscard]] MRMESH_API bool checkDeloneQuadrangleInMesh( const Mesh & mesh, EdgeId edge, const DeloneSettings& settings = {},
43 float * deviationSqAfterFlip = nullptr );
44
48[[nodiscard]] MRMESH_API bool bestQuadrangleDiagonal( const Vector3f& a, const Vector3f& b, const Vector3f& c, const Vector3f& d );
49
55MRMESH_API int makeDeloneEdgeFlips( Mesh & mesh, const DeloneSettings& settings = {}, int numIters = 1, ProgressCallback progressCallback = {} );
56
58MRMESH_API void makeDeloneOriginRing( Mesh & mesh, EdgeId e, const DeloneSettings& settings = {} );
59
61
62} // namespace MR
#define MRMESH_API
Definition MRMeshFwd.h:39
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:517
MRMESH_API int makeDeloneEdgeFlips(Mesh &mesh, const DeloneSettings &settings={}, int numIters=1, ProgressCallback progressCallback={})
MRMESH_API bool checkDeloneQuadrangleInMesh(const Mesh &mesh, EdgeId edge, const DeloneSettings &settings={}, float *deviationSqAfterFlip=nullptr)
squared surface deviation after flip is written here (at least when the function returns false)
MRMESH_API bool checkDeloneQuadrangle(const Vector3d &a, const Vector3d &b, const Vector3d &c, const Vector3d &d, double maxAngleChange=DBL_MAX)
MRMESH_API bool bestQuadrangleDiagonal(const Vector3f &a, const Vector3f &b, const Vector3f &c, const Vector3f &d)
MRMESH_API void makeDeloneOriginRing(Mesh &mesh, EdgeId e, const DeloneSettings &settings={})
improves mesh triangulation in a ring of vertices with common origin and represented by edge e
Definition MRCameraOrientationPlugin.h:7
Definition MRMeshDelone.h:11
const FaceBitSet * region
Region on mesh to be processed, it is constant and not updated.
Definition MRMeshDelone.h:20
float maxAngleChange
Maximal allowed dihedral angle change (in radians) over the flipped edge.
Definition MRMeshDelone.h:15
const UndirectedEdgeBitSet * notFlippable
Edges specified by this bit-set will never be flipped.
Definition MRMeshDelone.h:22
float criticalTriAspectRatio
Definition MRMeshDelone.h:18
float maxDeviationAfterFlip
Maximal allowed surface deviation during every individual flip.
Definition MRMeshDelone.h:13
Definition MRMesh.h:23