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_MeshProjectionResult MR_MeshProjectionResult; // Defined in `#include <MRCMesh/MRMeshProject.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
32
36
44
53
61
69
78
86
93
99
106
110
115
124
128
132
138
141
144
152
159
167
174
181
189
196
203
210
217
224
230
237
241
246
256
260
264
270
273
276
284
296MRC_API MR_MeshMeshDistanceResult *MR_findDistance(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const float *upDistLimitSq);
297
311
321
335
346MRC_API float MR_findMaxDistanceSqOneWay_MR_MeshPart(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const float *maxDistanceSq);
347
359MRC_API float MR_findMaxDistanceSq_MR_MeshPart(const MR_MeshPart *a, const MR_MeshPart *b, const MR_AffineXf3f *rigidB2A, const float *maxDistanceSq);
360
361#ifdef __cplusplus
362} // extern "C"
363#endif
struct MR_MeshPart MR_MeshPart
Definition MRAABBTree.h:19
struct MR_std_vector_MR_FaceFace MR_std_vector_MR_FaceFace
Definition MRMeshCollide.h:23
struct MR_MeshMeshSignedDistanceResult MR_MeshMeshSignedDistanceResult
Definition MRMeshMeshDistance.h:35
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 const MR_MeshProjectionResult * MR_MeshMeshDistanceResult_Get_b(const MR_MeshMeshDistanceResult *_this)
MRC_API void MR_MeshMeshSignedDistanceResult_Set_a(MR_MeshMeshSignedDistanceResult *_this, const MR_MeshProjectionResult *value)
MRC_API MR_MeshMeshSignedDistanceResult * MR_MeshMeshSignedDistanceResult_ConstructFrom(const MR_MeshProjectionResult *a, const MR_MeshProjectionResult *b, MR_MeshMeshCollisionStatus status, float signedDist)
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 MR_MeshProjectionResult * MR_MeshMeshSignedDistanceResult_GetMutable_b(MR_MeshMeshSignedDistanceResult *_this)
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 const MR_MeshProjectionResult * MR_MeshMeshDistanceResult_Get_a(const MR_MeshMeshDistanceResult *_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 const MR_MeshProjectionResult * MR_MeshMeshSignedDistanceResult_Get_b(const MR_MeshMeshSignedDistanceResult *_this)
MRC_API void MR_MeshMeshSignedDistanceResult_Set_status(MR_MeshMeshSignedDistanceResult *_this, MR_MeshMeshCollisionStatus value)
MRC_API MR_MeshMeshDistanceResult * MR_MeshMeshDistanceResult_ConstructFrom(const MR_MeshProjectionResult *a, const MR_MeshProjectionResult *b, float distSq)
MRC_API const MR_MeshProjectionResult * MR_MeshMeshSignedDistanceResult_Get_a(const MR_MeshMeshSignedDistanceResult *_this)
MRC_API MR_MeshProjectionResult * MR_MeshMeshSignedDistanceResult_GetMutable_a(MR_MeshMeshSignedDistanceResult *_this)
MRC_API MR_MeshMeshDistanceResult * MR_MeshMeshDistanceResult_DefaultConstruct(void)
MRC_API const MR_MeshMeshSignedDistanceResult * MR_MeshMeshSignedDistanceResult_OffsetPtr(const MR_MeshMeshSignedDistanceResult *ptr, ptrdiff_t i)
MRC_API void MR_MeshMeshDistanceResult_Set_b(MR_MeshMeshDistanceResult *_this, const MR_MeshProjectionResult *value)
MRC_API MR_MeshMeshSignedDistanceResult * MR_MeshMeshSignedDistanceResult_AssignFromAnother(MR_MeshMeshSignedDistanceResult *_this, const MR_MeshMeshSignedDistanceResult *_other)
MRC_API void MR_MeshMeshDistanceResult_Set_a(MR_MeshMeshDistanceResult *_this, const MR_MeshProjectionResult *value)
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 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
struct MR_MeshMeshDistanceResult MR_MeshMeshDistanceResult
Definition MRMeshMeshDistance.h:19
MRC_API MR_MeshProjectionResult * MR_MeshMeshDistanceResult_GetMutable_b(MR_MeshMeshDistanceResult *_this)
MRC_API MR_MeshMeshCollisionStatus * MR_MeshMeshSignedDistanceResult_GetMutable_status(MR_MeshMeshSignedDistanceResult *_this)
MRC_API MR_MeshProjectionResult * MR_MeshMeshDistanceResult_GetMutable_a(MR_MeshMeshDistanceResult *_this)
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 void MR_MeshMeshSignedDistanceResult_Set_b(MR_MeshMeshSignedDistanceResult *_this, const MR_MeshProjectionResult *value)
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
the meshes do not touch or collide one another, but inside/outside relation cannot be determined
Definition MRMeshMeshDistance.h:28
@ MR_MeshMeshCollisionStatus_NotColliding
Definition MRMeshMeshDistance.h:30
@ MR_MeshMeshCollisionStatus_AInside
Definition MRMeshMeshDistance.h:25
struct MR_MeshProjectionResult MR_MeshProjectionResult
Definition MRMesh.h:27
#define MRC_API
Definition include/MRCMisc/exports.h:11
Definition MRAffineXf.h:39