MeshLib Documentation
Loading...
Searching...
No Matches
MRMeshCollide.h File Reference
#include "MRFaceFace.h"
#include "MRMeshPart.h"
#include "MRProgressCallback.h"
#include "MRExpected.h"

Go to the source code of this file.

Namespaces

namespace  MR
 

Functions

MRMESH_API std::vector< FaceFaceMR::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 std::pair< FaceBitSet, FaceBitSet > MR::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< bool > MR::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
 
MRMESH_API Expected< std::vector< FaceFace > > MR::findSelfCollidingTriangles (const MeshPart &mp, ProgressCallback cb={}, const Face2RegionMap *regionMap=nullptr)
 finds all pairs of colliding triangles from one mesh or a region
 
MRMESH_API Expected< FaceBitSet > MR::findSelfCollidingTrianglesBS (const MeshPart &mp, ProgressCallback cb={}, const Face2RegionMap *regionMap=nullptr)
 the same findSelfCollidingTriangles but returns the union of all self-intersecting faces
 
MRMESH_API bool MR::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 bool MR::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 collision check; it is user's responsibility to guarantee that the meshes don't collide