MeshLib C Docs
Loading...
Searching...
No Matches
MRMeshMeshDistance.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/exports.h>
4
5#include <stddef.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef struct MR_AffineXf3f MR_AffineXf3f; // Defined in `#include <MRCMesh/MRAffineXf.h>`.
12typedef struct MR_MeshPart MR_MeshPart; // Defined in `#include <MRCMesh/MRMeshPart.h>`.
13typedef struct MR_PointOnFace MR_PointOnFace; // Defined in `#include <MRCMesh/MRPointOnFace.h>`.
14typedef struct MR_std_vector_MR_FaceFace MR_std_vector_MR_FaceFace; // Defined in `#include <MRCMisc/std_vector_MR_FaceFace.h>`.
15
16
20
30
34
41
49
56
63
71
78
85
91
98
102
107
116
120
124
130
133
136
144
151
159
166
173
181
188
195
202
209
216
222
229
233
238
248
252
256
262
265
268
276
288MRC_API MR_MeshMeshDistanceResult *MR_findDistance(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const float *upDistLimitSq);
289
303
313
327
338MRC_API float MR_findMaxDistanceSqOneWay_MR_MeshPart(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const float *maxDistanceSq);
339
351MRC_API float MR_findMaxDistanceSq_MR_MeshPart(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const float *maxDistanceSq);
352
353#ifdef __cplusplus
354} // extern "C"
355#endif
struct MR_MeshPart MR_MeshPart
Definition MRAABBTree.h:19
struct MR_PointOnFace MR_PointOnFace
Definition MREnumNeighbours.h:15
struct MR_std_vector_MR_FaceFace MR_std_vector_MR_FaceFace
Definition MRMeshCollide.h:22
MRC_API void MR_MeshMeshDistanceResult_Set_b(MR_MeshMeshDistanceResult *_this, const MR_PointOnFace *value)
struct MR_MeshMeshSignedDistanceResult MR_MeshMeshSignedDistanceResult
Definition MRMeshMeshDistance.h:33
MRC_API const MR_MeshMeshDistanceResult * MR_MeshMeshDistanceResult_OffsetPtr(const MR_MeshMeshDistanceResult *ptr, ptrdiff_t i)
MRC_API MR_MeshMeshDistanceResult * MR_findDistance(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const float *upDistLimitSq)
computes minimal distance between two meshes or two mesh regions
MRC_API void MR_MeshMeshDistanceResult_DestroyArray(const MR_MeshMeshDistanceResult *_this)
Destroys a heap-allocated array of MR_MeshMeshDistanceResult. Does nothing if the pointer is null.
MRC_API MR_MeshMeshSignedDistanceResult * MR_MeshMeshSignedDistanceResult_ConstructFromAnother(const MR_MeshMeshSignedDistanceResult *_other)
MRC_API void MR_MeshMeshSignedDistanceResult_DestroyArray(const MR_MeshMeshSignedDistanceResult *_this)
Destroys a heap-allocated array of MR_MeshMeshSignedDistanceResult. Does nothing if the pointer is nu...
MRC_API MR_MeshMeshSignedDistanceResult * MR_findSignedDistance_MR_MeshPart(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const float *upDistLimitSq)
computes minimal distance between two meshes
MRC_API void MR_MeshMeshSignedDistanceResult_Set_a(MR_MeshMeshSignedDistanceResult *_this, const MR_PointOnFace *value)
MRC_API MR_MeshMeshDistanceResult * MR_MeshMeshDistanceResult_ConstructFromAnother(const MR_MeshMeshDistanceResult *_other)
MRC_API MR_MeshMeshDistanceResult * MR_MeshMeshDistanceResult_OffsetMutablePtr(MR_MeshMeshDistanceResult *ptr, ptrdiff_t i)
MRC_API const MR_MeshMeshCollisionStatus * MR_MeshMeshSignedDistanceResult_Get_status(const MR_MeshMeshSignedDistanceResult *_this)
MRC_API void MR_MeshMeshDistanceResult_Destroy(const MR_MeshMeshDistanceResult *_this)
Destroys a heap-allocated instance of MR_MeshMeshDistanceResult. Does nothing if the pointer is null.
MRC_API MR_PointOnFace * MR_MeshMeshSignedDistanceResult_GetMutable_b(MR_MeshMeshSignedDistanceResult *_this)
MRC_API void MR_MeshMeshSignedDistanceResult_Set_status(MR_MeshMeshSignedDistanceResult *_this, MR_MeshMeshCollisionStatus value)
MRC_API MR_PointOnFace * MR_MeshMeshSignedDistanceResult_GetMutable_a(MR_MeshMeshSignedDistanceResult *_this)
MRC_API MR_MeshMeshDistanceResult * MR_MeshMeshDistanceResult_DefaultConstruct(void)
MRC_API MR_MeshMeshDistanceResult * MR_MeshMeshDistanceResult_ConstructFrom(const MR_PointOnFace *a, const MR_PointOnFace *b, float distSq)
MRC_API const MR_PointOnFace * MR_MeshMeshDistanceResult_Get_a(const MR_MeshMeshDistanceResult *_this)
MRC_API const MR_MeshMeshSignedDistanceResult * MR_MeshMeshSignedDistanceResult_OffsetPtr(const MR_MeshMeshSignedDistanceResult *ptr, ptrdiff_t i)
MRC_API MR_PointOnFace * MR_MeshMeshDistanceResult_GetMutable_b(MR_MeshMeshDistanceResult *_this)
MRC_API MR_MeshMeshSignedDistanceResult * MR_MeshMeshSignedDistanceResult_ConstructFrom(const MR_PointOnFace *a, const MR_PointOnFace *b, MR_MeshMeshCollisionStatus status, float signedDist)
MRC_API MR_MeshMeshSignedDistanceResult * MR_MeshMeshSignedDistanceResult_AssignFromAnother(MR_MeshMeshSignedDistanceResult *_this, const MR_MeshMeshSignedDistanceResult *_other)
MRC_API void MR_MeshMeshSignedDistanceResult_Set_signedDist(MR_MeshMeshSignedDistanceResult *_this, float value)
MRC_API MR_MeshMeshCollisionStatus MR_findCollisionStatus_3(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A)
finds if two meshes are touching, colliding or inside each other
MRC_API const MR_PointOnFace * MR_MeshMeshDistanceResult_Get_b(const MR_MeshMeshDistanceResult *_this)
MRC_API MR_PointOnFace * MR_MeshMeshDistanceResult_GetMutable_a(MR_MeshMeshDistanceResult *_this)
MRC_API MR_MeshMeshDistanceResult * MR_MeshMeshDistanceResult_DefaultConstructArray(size_t num_elems)
MRC_API float MR_findMaxDistanceSqOneWay_MR_MeshPart(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const float *maxDistanceSq)
returns the maximum of the squared distances from each B-mesh vertex to A-mesh
MRC_API MR_MeshMeshCollisionStatus MR_findCollisionStatus_5(const MR_MeshPart *a, const MR_MeshPart *b, const MR_MeshMeshDistanceResult *distRes, const MR_AffineXf3f *rigidB2A, MR_std_vector_MR_FaceFace *collisions)
finds if two meshes are touching, colliding or inside each other
MRC_API const MR_PointOnFace * MR_MeshMeshSignedDistanceResult_Get_a(const MR_MeshMeshSignedDistanceResult *_this)
MRC_API const MR_PointOnFace * MR_MeshMeshSignedDistanceResult_Get_b(const MR_MeshMeshSignedDistanceResult *_this)
struct MR_MeshMeshDistanceResult MR_MeshMeshDistanceResult
Definition MRMeshMeshDistance.h:19
MRC_API MR_MeshMeshCollisionStatus * MR_MeshMeshSignedDistanceResult_GetMutable_status(MR_MeshMeshSignedDistanceResult *_this)
MRC_API void MR_MeshMeshSignedDistanceResult_Set_b(MR_MeshMeshSignedDistanceResult *_this, const MR_PointOnFace *value)
MRC_API float * MR_MeshMeshDistanceResult_GetMutable_distSq(MR_MeshMeshDistanceResult *_this)
MRC_API float MR_findMaxDistanceSq_MR_MeshPart(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const float *maxDistanceSq)
returns the squared Hausdorff distance between two meshes, that is the maximum of squared distances f...
MRC_API MR_MeshMeshSignedDistanceResult * MR_MeshMeshSignedDistanceResult_DefaultConstruct(void)
MRC_API MR_MeshMeshSignedDistanceResult * MR_MeshMeshSignedDistanceResult_OffsetMutablePtr(MR_MeshMeshSignedDistanceResult *ptr, ptrdiff_t i)
MRC_API const float * MR_MeshMeshSignedDistanceResult_Get_signedDist(const MR_MeshMeshSignedDistanceResult *_this)
MRC_API float * MR_MeshMeshSignedDistanceResult_GetMutable_signedDist(MR_MeshMeshSignedDistanceResult *_this)
MRC_API MR_MeshMeshSignedDistanceResult * MR_MeshMeshSignedDistanceResult_DefaultConstructArray(size_t num_elems)
MRC_API const float * MR_MeshMeshDistanceResult_Get_distSq(const MR_MeshMeshDistanceResult *_this)
MRC_API void MR_MeshMeshDistanceResult_Set_distSq(MR_MeshMeshDistanceResult *_this, float value)
MRC_API MR_MeshMeshDistanceResult * MR_MeshMeshDistanceResult_AssignFromAnother(MR_MeshMeshDistanceResult *_this, const MR_MeshMeshDistanceResult *_other)
MRC_API void MR_MeshMeshSignedDistanceResult_Destroy(const MR_MeshMeshSignedDistanceResult *_this)
Destroys a heap-allocated instance of MR_MeshMeshSignedDistanceResult. Does nothing if the pointer is...
MR_MeshMeshCollisionStatus
Definition MRMeshMeshDistance.h:22
@ MR_MeshMeshCollisionStatus_BothInside
Definition MRMeshMeshDistance.h:24
@ MR_MeshMeshCollisionStatus_Colliding
Definition MRMeshMeshDistance.h:27
@ MR_MeshMeshCollisionStatus_BothOutside
Definition MRMeshMeshDistance.h:23
@ MR_MeshMeshCollisionStatus_BInside
Definition MRMeshMeshDistance.h:26
@ MR_MeshMeshCollisionStatus_Touching
Definition MRMeshMeshDistance.h:28
@ MR_MeshMeshCollisionStatus_AInside
Definition MRMeshMeshDistance.h:25
MRC_API void MR_MeshMeshDistanceResult_Set_a(MR_MeshMeshDistanceResult *_this, const MR_PointOnFace *value)
#define MRC_API
Definition include/MRCMisc/exports.h:11
Definition MRAffineXf.h:39