MeshLib C++ Docs
Loading...
Searching...
No Matches
MROverlappingTris.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRExpected.h"
5#include <cfloat>
6
7namespace MR
8{
11
12
14{
16 float maxDistSq = 1e-10f;
17
19 float maxNormalDot = -0.99f;
20
24 float minNormalDot = FLT_MAX;
25
27 float minAreaFraction = 1e-5f;
28
30 std::function<bool( FaceId l, FaceId r )> pred;
31
34
36 MR_BIND_PREFER_UNLOCK_GIL_WHEN_USED_AS_PARAM
37};
38
40[[nodiscard]] MRMESH_API Expected<FaceBitSet> findOverlappingTris( const MeshPart & mp, const FindOverlappingSettings & settings );
41
42}
#define MRMESH_API
Definition MRMeshFwd.h:85
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:790
float minAreaFraction
consider triangle as overlapping only if the area of the oppositely oriented triangle is at least giv...
Definition MROverlappingTris.h:27
tl::expected< T, E > Expected
Definition MRExpected.h:31
Expected< FaceBitSet > findOverlappingTris(const MeshPart &mp, const FindOverlappingSettings &settings)
finds all triangles that have oppositely (or similarly, see minNormalDot) oriented close triangle in ...
float minNormalDot
Definition MROverlappingTris.h:24
float maxNormalDot
suggestion: multiply it on mesh.getBoundingBox().size().lengthSq();
Definition MROverlappingTris.h:19
ProgressCallback cb
for reporting current progress and allowing the user to cancel the algorithm
Definition MROverlappingTris.h:33
std::function< bool(FaceId l, FaceId r)> pred
if predicate is present it should return true for pair of faces that should be considered as overlap
Definition MROverlappingTris.h:30
float maxDistSq
maximal distance between closest points of one triangle and another overlapping triangle
Definition MROverlappingTris.h:16
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
Definition MROverlappingTris.h:14