MeshLib Documentation
Loading...
Searching...
No Matches
MRMeshCollide.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRFaceFace.h"
4#include "MRMeshPart.h"
6#include "MRExpected.h"
7
8namespace MR
9{
10
13
19[[nodiscard]] MRMESH_API std::vector<FaceFace> findCollidingTriangles( const MeshPart & a, const MeshPart & b,
20 const AffineXf3f * rigidB2A = nullptr, bool firstIntersectionOnly = false );
21
23[[nodiscard]] MRMESH_API std::pair<FaceBitSet, FaceBitSet> findCollidingTriangleBitsets( const MeshPart& a, const MeshPart& b,
24 const AffineXf3f* rigidB2A = nullptr );
25
27[[nodiscard]] MRMESH_API Expected<bool> findSelfCollidingTriangles( const MeshPart& mp,
28 std::vector<FaceFace> * outCollidingPairs,
29 ProgressCallback cb = {},
30 const Face2RegionMap * regionMap = nullptr );
31
34 const Face2RegionMap * regionMap = nullptr );
35
38 const Face2RegionMap * regionMap = nullptr );
39
44[[nodiscard]] MRMESH_API bool isInside( const MeshPart & a, const MeshPart & b, const AffineXf3f * rigidB2A = nullptr );
45
51[[nodiscard]] MRMESH_API bool isNonIntersectingInside( const MeshPart & a, const MeshPart & b, const AffineXf3f * rigidB2A = nullptr );
52
54
55} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
MRMESH_API bool isNonIntersectingInside(const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr)
checks that arbitrary mesh part A is inside of closed mesh part B The version of isInside without col...
MRMESH_API bool isInside(const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr)
checks that arbitrary mesh part A is inside of closed mesh part B
MRMESH_API std::pair< FaceBitSet, FaceBitSet > findCollidingTriangleBitsets(const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr)
the same as findCollidingTriangles, but returns one bite set per mesh with colliding triangles
MRMESH_API Expected< FaceBitSet > findSelfCollidingTrianglesBS(const MeshPart &mp, ProgressCallback cb={}, const Face2RegionMap *regionMap=nullptr)
the same findSelfCollidingTriangles but returns the union of all self-intersecting faces
MRMESH_API std::vector< FaceFace > findCollidingTriangles(const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr, bool firstIntersectionOnly=false)
finds all pairs of colliding triangles from two meshes or two mesh regions
MRMESH_API Expected< bool > findSelfCollidingTriangles(const MeshPart &mp, std::vector< FaceFace > *outCollidingPairs, ProgressCallback cb={}, const Face2RegionMap *regionMap=nullptr)
finds all pairs (or the fact of any self-collision) of colliding triangles from one mesh or a region
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:58