MeshLib C++ Docs
Loading...
Searching...
No Matches
MRMeshCollidePrecise.h File Reference
#include "MRId.h"
#include "MRMeshPart.h"
#include "MRPrecisePredicates3.h"
#include "MRVector.h"
#include <functional>

Go to the source code of this file.

Classes

struct  MR::EdgeTri
 edge from one mesh and triangle from another mesh More...
struct  MR::VarEdgeTri
struct  MR::VarEdgeTri::FlaggedTri

Namespaces

namespace  MR
 Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).

Typedefs

using MR::PreciseCollisionResult = Vector<VarEdgeTri>

Functions

bool MR::operator== (const EdgeTri &a, const EdgeTri &b)
PreciseCollisionResult MR::findCollidingEdgeTrisPrecise (const MeshPart &a, const MeshPart &b, ConvertToIntVector conv, const AffineXf3f *rigidB2A=nullptr, bool anyIntersection=false)
 finds all pairs of colliding edges from one mesh and triangle from another mesh
PreciseCollisionResult MR::findCollidingEdgeTrisPrecise (const MeshPart &a, const AABBTree &aTree, const MeshPart &b, const AABBTree &bTree, ConvertToIntVector conv, const AffineXf3f *rigidB2A=nullptr, bool anyIntersection=false)
 the same with the trees given by the caller instead of the cached trees of the meshes
void MR::updateCollidingEdgeTrisPrecise (PreciseCollisionResult &res, const Mesh &a, VertId aFirstNewVert, const Mesh &b, VertId bFirstNewVert, ConvertToIntVector conv, const AffineXf3f *rigidB2A=nullptr)
 updates the result of findCollidingEdgeTrisPrecise( a, b, conv, rigidB2A ) after some faces or edges of the meshes were split (e.g. in subdivideLoneContours) with no other changes in the meshes: removes all intersections with the triangles around new vertices (the split triangles and their new parts) and with their edges, and finds them again, which is much faster than new search if few faces were split, but slower if many were split: so if more than 1/32 of all vertices are new, the function makes new search instead; the AABB trees of the meshes must be updated after the splits (e.g. by Mesh::updateCachesAfterSplits) or invalidated
std::vector< EdgeTri > MR::findSelfCollidingEdgeTrisPrecise (const MeshPart &mp, ConvertToIntVector conv, bool anyIntersection=false, const AffineXf3f *rigidB2A=nullptr, int aVertSizes=0)
 finds all pairs of colliding edges and triangle within one mesh
std::vector< EdgeTri > MR::findCollidingEdgeTrisPrecise (const Mesh &a, const std::vector< EdgeId > &edgesA, const Mesh &b, const std::vector< FaceId > &facesB, ConvertToIntVector conv, const AffineXf3f *rigidB2A=nullptr)
 finds all intersections between every given edge from A and given triangles from B
std::vector< EdgeTri > MR::findCollidingEdgeTrisPrecise (const Mesh &a, const std::vector< FaceId > &facesA, const Mesh &b, const std::vector< EdgeId > &edgesB, ConvertToIntVector conv, const AffineXf3f *rigidB2A=nullptr)
 finds all intersections between every given triangle from A and given edge from B
CoordinateConverters MR::getVectorConverters (const MeshPart &a)
 creates simple converters from Vector3f to Vector3i and back in mesh part area range
CoordinateConverters MR::getVectorConverters (const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr)
 creates simple converters from Vector3f to Vector3i and back in mesh parts area range