MeshLib C++ Docs
Loading...
Searching...
No Matches

Classes

struct  MR::IntrinsicDeloneSettings

Enumerations

enum class  MR::FlipEdge : int { MR::FlipEdge::Can , MR::FlipEdge::Cannot , MR::FlipEdge::Must }

Functions

bool MR::checkDeloneQuadrangle (const Vector3d &a, const Vector3d &b, const Vector3d &c, const Vector3d &d, double maxAngleChange=DBL_MAX)
bool MR::checkDeloneQuadrangle (const Vector3f &a, const Vector3f &b, const Vector3f &c, const Vector3f &d, float maxAngleChange=FLT_MAX)
 converts arguments in double and calls above function
FlipEdge MR::canFlipEdge (const MeshTopology &topology, EdgeId edge, const FaceBitSet *region=nullptr, const UndirectedEdgeBitSet *notFlippable=nullptr, const VertBitSet *vertRegion=nullptr)
 consider topology and constraints to decide about flip possibility
bool MR::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)
bool MR::checkDeloneQuadrangleInMesh (const MeshTopology &topology, const VertCoords &points, EdgeId edge, const DeloneSettings &settings={}, float *deviationSqAfterFlip=nullptr)
 squared surface deviation after flip is written here (at least when the function returns false)
bool MR::bestQuadrangleDiagonal (const Vector3f &a, const Vector3f &b, const Vector3f &c, const Vector3f &d)
void MR::makeDeloneOriginRing (Mesh &mesh, EdgeId e, const DeloneSettings &settings={})
 improves mesh triangulation in a ring of vertices with common origin and represented by edge e
void MR::makeDeloneOriginRing (MeshTopology &topology, const VertCoords &points, EdgeId e, const DeloneSettings &settings={})
int MR::makeDeloneEdgeFlips (Mesh &mesh, const DeloneSettings &settings={}, int numIters=1, const ProgressCallback &progressCallback={})
int MR::makeDeloneEdgeFlips (MeshTopology &topology, const VertCoords &points, const DeloneSettings &settings={}, int numIters=1, const ProgressCallback &progressCallback={})
int MR::makeDeloneEdgeFlips (EdgeLengthMesh &mesh, const IntrinsicDeloneSettings &settings={}, int numIters=1, const ProgressCallback &progressCallback={})

Detailed Description

https:///en.wikipedia.org/wiki/Boris_Delaunay

Enumeration Type Documentation

◆ FlipEdge

enum class MR::FlipEdge : int
strong

#include <MRMesh/MRMeshDelone.h>

Enumerator
Can 

edge flipping is possible

Cannot 

edge flipping is prohibited by topology or by constraints

Must 

edge flipping is required to solve some topology issue

Function Documentation

◆ bestQuadrangleDiagonal()

bool MR::bestQuadrangleDiagonal ( const Vector3f & a,
const Vector3f & b,
const Vector3f & c,
const Vector3f & d )
nodiscard

#include <MRMesh/MRMeshDelone.h>

given quadrangle ABCD, selects how to best triangulate it: false = by introducing BD diagonal and splitting ABCD on triangles ABD and DBC, true = by introducing AC diagonal and splitting ABCD on triangles ABC and ACD

◆ canFlipEdge()

FlipEdge MR::canFlipEdge ( const MeshTopology & topology,
EdgeId edge,
const FaceBitSet * region = nullptr,
const UndirectedEdgeBitSet * notFlippable = nullptr,
const VertBitSet * vertRegion = nullptr )
nodiscard

#include <MRMesh/MRMeshDelone.h>

consider topology and constraints to decide about flip possibility

◆ checkDeloneQuadrangle() [1/2]

bool MR::checkDeloneQuadrangle ( const Vector3d & a,
const Vector3d & b,
const Vector3d & c,
const Vector3d & d,
double maxAngleChange = DBL_MAX )
nodiscard

#include <MRMesh/MRMeshDelone.h>

given quadrangle ABCD, checks whether its edge AC satisfies Delone's condition; if dihedral angles 1) between triangles ABD and DBC and 2) between triangles ABC and ACD differ more than on maxAngleChange then also returns true to prevent flipping from 1) to 2)

◆ checkDeloneQuadrangle() [2/2]

bool MR::checkDeloneQuadrangle ( const Vector3f & a,
const Vector3f & b,
const Vector3f & c,
const Vector3f & d,
float maxAngleChange = FLT_MAX )
nodiscard

#include <MRMesh/MRMeshDelone.h>

converts arguments in double and calls above function

◆ checkDeloneQuadrangleInMesh() [1/2]

bool MR::checkDeloneQuadrangleInMesh ( const Mesh & mesh,
EdgeId edge,
const DeloneSettings & settings = {},
float * deviationSqAfterFlip = nullptr )
nodiscard

#include <MRMesh/MRMeshDelone.h>

squared surface deviation after flip is written here (at least when the function returns false)

consider quadrangle formed by left and right triangles of given edge, and checks whether this edge satisfies Delone's condition in the quadrangle;

Returns
false otherwise if flipping the edge does not introduce too large surface deviation (can be returned only for inner edge of the region)

◆ checkDeloneQuadrangleInMesh() [2/2]

bool MR::checkDeloneQuadrangleInMesh ( const MeshTopology & topology,
const VertCoords & points,
EdgeId edge,
const DeloneSettings & settings = {},
float * deviationSqAfterFlip = nullptr )
nodiscard

#include <MRMesh/MRMeshDelone.h>

squared surface deviation after flip is written here (at least when the function returns false)

◆ makeDeloneEdgeFlips() [1/3]

int MR::makeDeloneEdgeFlips ( EdgeLengthMesh & mesh,
const IntrinsicDeloneSettings & settings = {},
int numIters = 1,
const ProgressCallback & progressCallback = {} )

#include <MRMesh/MRMeshDelone.h>

improves mesh triangulation by performing flipping of edges to satisfy Intrinsic Delaunay local property, consider every edge at most numIters times,

Returns
the number of flips done
Parameters
numItersMaximal iteration count
progressCallbackCallback to report algorithm progress and cancel it by user request see "An Algorithm for the Construction of Intrinsic Delaunay Triangulations with Applications to Digital Geometry Processing". https:/// page.math.tu-berlin.de/~bobenko/papers/InDel.pdf

◆ makeDeloneEdgeFlips() [2/3]

int MR::makeDeloneEdgeFlips ( Mesh & mesh,
const DeloneSettings & settings = {},
int numIters = 1,
const ProgressCallback & progressCallback = {} )

#include <MRMesh/MRMeshDelone.h>

improves mesh triangulation by performing flipping of edges to satisfy Delone local property, consider every edge at most numIters times, and allow surface deviation at most on given value during every individual flip,

Returns
the number of flips done
Parameters
numItersMaximal iteration count
progressCallbackCallback to report algorithm progress and cancel it by user request

◆ makeDeloneEdgeFlips() [3/3]

int MR::makeDeloneEdgeFlips ( MeshTopology & topology,
const VertCoords & points,
const DeloneSettings & settings = {},
int numIters = 1,
const ProgressCallback & progressCallback = {} )

◆ makeDeloneOriginRing() [1/2]

void MR::makeDeloneOriginRing ( Mesh & mesh,
EdgeId e,
const DeloneSettings & settings = {} )

#include <MRMesh/MRMeshDelone.h>

improves mesh triangulation in a ring of vertices with common origin and represented by edge e

◆ makeDeloneOriginRing() [2/2]

void MR::makeDeloneOriginRing ( MeshTopology & topology,
const VertCoords & points,
EdgeId e,
const DeloneSettings & settings = {} )