#include <MRCMesh/MRId.h>#include <MRCMisc/common.h>#include <MRCMisc/exports.h>#include <stdbool.h>Go to the source code of this file.
Typedefs | |
| typedef struct MR_Face2RegionMap | MR_Face2RegionMap |
| typedef struct MR_expected_bool_std_string | MR_expected_bool_std_string |
| typedef struct MR_expected_std_vector_MR_FaceFace_std_string | MR_expected_std_vector_MR_FaceFace_std_string |
| typedef struct MR_std_pair_MR_FaceBitSet_MR_FaceBitSet | MR_std_pair_MR_FaceBitSet_MR_FaceBitSet |
| typedef struct MR_std_vector_MR_FaceFace | MR_std_vector_MR_FaceFace |
Functions | |
| MRC_API MR_std_vector_MR_FaceFace * | MR_findCollidingTriangles (const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const bool *firstIntersectionOnly) |
| finds all pairs of colliding triangles from two meshes or two mesh regions | |
| MRC_API MR_std_pair_MR_FaceBitSet_MR_FaceBitSet * | MR_findCollidingTriangleBitsets (const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A) |
| MRC_API MR_expected_bool_std_string * | MR_findSelfCollidingTriangles_outPairs (const MR_MeshPart *mp, MR_std_vector_MR_FaceFace *outCollidingPairs, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb, const MR_Face2RegionMap *regionMap, const bool *touchIsIntersection) |
| MRC_API MR_expected_std_vector_MR_FaceFace_std_string * | MR_findSelfCollidingTriangles (const MR_MeshPart *mp, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb, const MR_Face2RegionMap *regionMap, const bool *touchIsIntersection) |
| MRC_API MR_expected_MR_FaceBitSet_std_string * | MR_findSelfCollidingTrianglesBS (const MR_MeshPart *mp, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb, const MR_Face2RegionMap *regionMap, const bool *touchIsIntersection) |
| MRC_API bool | MR_isInside_MR_MeshPart (const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A) |
| checks that arbitrary mesh part A is inside of closed mesh part B | |
| MRC_API bool | MR_isNonIntersectingInside_3 (const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A) |
| 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 If B is open, A is outside of B when the point of A tested projects on the boundary of B | |
| MRC_API bool | MR_isNonIntersectingInside_4 (const MR_Mesh *a, MR_FaceId partFace, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A) |
| checks that arbitrary mesh A part (whole part is represented by one face partFace) 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 If B is open, A is outside of B when the point of A tested projects on the boundary of B | |
| MRC_API bool | MR_isNonIntersectingInsidePrecise (const MR_Mesh *a, MR_FaceId partFace, const MR_MeshPart *b, const MR_CoordinateConverters *conv, int aVertShift, int bVertShift, const MR_AffineXf3f *xfA, const MR_AffineXf3f *xfB) |
| checks that arbitrary mesh A part (whole part is represented by one face partFace) is inside of closed mesh part B The version of isNonIntersectingInside deciding by the precise orient3d predicate, which is never undefined, unlike the sign of the distance in the area where the meshes touch one another If B is open, A is outside of B when the vertex of A tested projects on the boundary of B | |
| typedef struct MR_expected_bool_std_string MR_expected_bool_std_string |
Stores either a bool that represents success or a std::string that represents an error. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).
| typedef struct MR_expected_std_vector_MR_FaceFace_std_string MR_expected_std_vector_MR_FaceFace_std_string |
Stores either a std::vector<MR::FaceFace> that represents success or a std::string that represents an error. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).
| typedef struct MR_Face2RegionMap MR_Face2RegionMap |
Vector<T> is indexed by size_t Generated from class MR::Face2RegionMap. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).
Stores two objects: MR::FaceBitSet and MR::FaceBitSet. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).
| typedef struct MR_std_vector_MR_FaceFace MR_std_vector_MR_FaceFace |
Generated from C++ container std::vector<MR::FaceFace>. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).
| MRC_API MR_std_pair_MR_FaceBitSet_MR_FaceBitSet * MR_findCollidingTriangleBitsets | ( | const MR_MeshPart * | a, |
| const MR_MeshPart * | b, | ||
| const MR_AffineXf3f * | rigidB2A ) |
the same as findCollidingTriangles, but returns one bite set per mesh with colliding triangles Generated from function MR::findCollidingTriangleBitsets. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter rigidB2A defaults to a null pointer in C++. Never returns null. Returns an instance allocated on the heap! Must call MR_std_pair_MR_FaceBitSet_MR_FaceBitSet_Destroy() to free it when you're done using it.
| MRC_API MR_std_vector_MR_FaceFace * MR_findCollidingTriangles | ( | const MR_MeshPart * | a, |
| const MR_MeshPart * | b, | ||
| const MR_AffineXf3f * | rigidB2A, | ||
| const bool * | firstIntersectionOnly ) |
finds all pairs of colliding triangles from two meshes or two mesh regions
| rigidB2A | rigid transformation from B-mesh space to A mesh space, nullptr considered as identity transformation |
| firstIntersectionOnly | if true then the function returns at most one pair of intersecting triangles (the same in every run), testing the triangles during the tree traversal and stopping it as soon as an intersection is found Generated from function MR::findCollidingTriangles. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter rigidB2A defaults to a null pointer in C++. Parameter firstIntersectionOnly has a default argument: false, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_vector_MR_FaceFace_Destroy() to free it when you're done using it. |
| MRC_API MR_expected_std_vector_MR_FaceFace_std_string * MR_findSelfCollidingTriangles | ( | const MR_MeshPart * | mp, |
| MR_PassBy | cb_pass_by, | ||
| MR_std_function_bool_from_float * | cb, | ||
| const MR_Face2RegionMap * | regionMap, | ||
| const bool * | touchIsIntersection ) |
finds all pairs of colliding triangles from one mesh or a region Generated from function MR::findSelfCollidingTriangles. Parameter mp can not be null. It is a single object. Parameter cb has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it. Parameter regionMap defaults to a null pointer in C++. Parameter touchIsIntersection has a default argument: false, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_std_vector_MR_FaceFace_std_string_Destroy() to free it when you're done using it.
| MRC_API MR_expected_bool_std_string * MR_findSelfCollidingTriangles_outPairs | ( | const MR_MeshPart * | mp, |
| MR_std_vector_MR_FaceFace * | outCollidingPairs, | ||
| MR_PassBy | cb_pass_by, | ||
| MR_std_function_bool_from_float * | cb, | ||
| const MR_Face2RegionMap * | regionMap, | ||
| const bool * | touchIsIntersection ) |
finds all pairs (or the fact of any self-collision) of colliding triangles from one mesh or a region Generated from function MR::findSelfCollidingTriangles. Parameter mp can not be null. It is a single object. Parameter cb has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it. Parameter regionMap defaults to a null pointer in C++. Parameter touchIsIntersection has a default argument: false, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_bool_std_string_Destroy() to free it when you're done using it.
| MRC_API MR_expected_MR_FaceBitSet_std_string * MR_findSelfCollidingTrianglesBS | ( | const MR_MeshPart * | mp, |
| MR_PassBy | cb_pass_by, | ||
| MR_std_function_bool_from_float * | cb, | ||
| const MR_Face2RegionMap * | regionMap, | ||
| const bool * | touchIsIntersection ) |
the same findSelfCollidingTriangles but returns the union of all self-intersecting faces Generated from function MR::findSelfCollidingTrianglesBS. Parameter mp can not be null. It is a single object. Parameter cb has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it. Parameter regionMap defaults to a null pointer in C++. Parameter touchIsIntersection has a default argument: false, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_MR_FaceBitSet_std_string_Destroy() to free it when you're done using it.
| MRC_API bool MR_isInside_MR_MeshPart | ( | const MR_MeshPart * | a, |
| const MR_MeshPart * | b, | ||
| const MR_AffineXf3f * | rigidB2A ) |
checks that arbitrary mesh part A is inside of closed mesh part B
| rigidB2A | rigid transformation from B-mesh space to A mesh space, nullptr considered as identity transformation Generated from function MR::isInside. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter rigidB2A defaults to a null pointer in C++. |
| MRC_API bool MR_isNonIntersectingInside_3 | ( | const MR_MeshPart * | a, |
| const MR_MeshPart * | b, | ||
| const MR_AffineXf3f * | rigidB2A ) |
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 If B is open, A is outside of B when the point of A tested projects on the boundary of B
| rigidB2A | rigid transformation from B-mesh space to A mesh space, nullptr considered as identity transformation Generated from function MR::isNonIntersectingInside. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter rigidB2A defaults to a null pointer in C++. |
| MRC_API bool MR_isNonIntersectingInside_4 | ( | const MR_Mesh * | a, |
| MR_FaceId | partFace, | ||
| const MR_MeshPart * | b, | ||
| const MR_AffineXf3f * | rigidB2A ) |
checks that arbitrary mesh A part (whole part is represented by one face partFace) 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 If B is open, A is outside of B when the point of A tested projects on the boundary of B
| rigidB2A | rigid transformation from B-mesh space to A mesh space, nullptr considered as identity transformation Generated from function MR::isNonIntersectingInside. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter rigidB2A defaults to a null pointer in C++. |
| MRC_API bool MR_isNonIntersectingInsidePrecise | ( | const MR_Mesh * | a, |
| MR_FaceId | partFace, | ||
| const MR_MeshPart * | b, | ||
| const MR_CoordinateConverters * | conv, | ||
| int | aVertShift, | ||
| int | bVertShift, | ||
| const MR_AffineXf3f * | xfA, | ||
| const MR_AffineXf3f * | xfB ) |
checks that arbitrary mesh A part (whole part is represented by one face partFace) is inside of closed mesh part B The version of isNonIntersectingInside deciding by the precise orient3d predicate, which is never undefined, unlike the sign of the distance in the area where the meshes touch one another If B is open, A is outside of B when the vertex of A tested projects on the boundary of B
| conv | float-to-int converter valid for the points of both meshes after the transformations below |
| aVertShift | the value added to the vertex ids of mesh a, and |
| bVertShift | - of mesh b; the shifted ids must be distinct, and every call on the same meshes must shift them equally, because the simulation of simplicity of orient3d depends on them |
| xfA | transformation of mesh a into the space of conv, nullptr considered as identity transformation |
| xfB | transformation of mesh b into the space of conv, nullptr considered as identity transformation Generated from function MR::isNonIntersectingInsidePrecise. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter conv can not be null. It is a single object. Parameter xfA defaults to a null pointer in C++. Parameter xfB defaults to a null pointer in C++. |