MeshLib C Docs
Loading...
Searching...
No Matches
MRTriangleIntersection.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/exports.h>
4
5#include <stdbool.h>
6#include <stddef.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct MR_IntersectionPrecomputes_double MR_IntersectionPrecomputes_double; // Defined in `#include <MRCMesh/MRIntersectionPrecomputes.h>`.
13typedef struct MR_IntersectionPrecomputes_float MR_IntersectionPrecomputes_float; // Defined in `#include <MRCMesh/MRIntersectionPrecomputes.h>`.
14typedef struct MR_TriPointf MR_TriPointf; // Defined in `#include <MRCMesh/MRTriPoint.h>`.
15typedef struct MR_Vector2d MR_Vector2d; // Defined in `#include <MRCMesh/MRVector2.h>`.
16typedef struct MR_Vector2f MR_Vector2f; // Defined in `#include <MRCMesh/MRVector2.h>`.
17typedef struct MR_Vector3d MR_Vector3d; // Defined in `#include <MRCMesh/MRVector3.h>`.
18typedef struct MR_Vector3f MR_Vector3f; // Defined in `#include <MRCMesh/MRVector3.h>`.
19typedef struct MR_std_optional_MR_TriIntersectResult MR_std_optional_MR_TriIntersectResult; // Defined in `#include <MRCMisc/std_optional_MR_TriIntersectResult.h>`.
20
21
25
26// barycentric representation
31
32// barycentric representation
39
40// barycentric representation
45
46// distance from ray origin to p in dir length units
51
52// distance from ray origin to p in dir length units
57
58// distance from ray origin to p in dir length units
63
69
73
77
81
84
87
95
103
111
118
125
132
139
147
155
163
171
179
187
195
203
212MRC_API bool MR_doTrianglesOverlap_float(const MR_Vector2f *a, const MR_Vector2f *b, const MR_Vector2f *c, const MR_Vector2f *d, const MR_Vector2f *e, const MR_Vector2f *f);
213
222MRC_API bool MR_doTrianglesOverlap_double(const MR_Vector2d *a, const MR_Vector2d *b, const MR_Vector2d *c, const MR_Vector2d *d, const MR_Vector2d *e, const MR_Vector2d *f);
223
224#ifdef __cplusplus
225} // extern "C"
226#endif
struct MR_IntersectionPrecomputes_float MR_IntersectionPrecomputes_float
Definition MRIntersectionPrecomputes.h:17
struct MR_IntersectionPrecomputes_double MR_IntersectionPrecomputes_double
Definition MRIntersectionPrecomputes.h:23
struct MR_TriPointf MR_TriPointf
Definition MRMeshTriPoint.h:17
MRC_API MR_std_optional_MR_TriIntersectResult * MR_rayTriangleIntersect_float_MR_IntersectionPrecomputes_float(const MR_Vector3f *oriA, const MR_Vector3f *oriB, const MR_Vector3f *oriC, const MR_IntersectionPrecomputes_float *prec)
MRC_API bool MR_doTrianglesOverlap_float(const MR_Vector2f *a, const MR_Vector2f *b, const MR_Vector2f *c, const MR_Vector2f *d, const MR_Vector2f *e, const MR_Vector2f *f)
struct MR_TriIntersectResult MR_TriIntersectResult
Definition MRTriangleIntersection.h:24
MRC_API bool MR_isPointInPlane_float(const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API bool MR_isPointInSegm_float(const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b)
MRC_API bool MR_isPointInPlane_double(const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API MR_TriIntersectResult * MR_TriIntersectResult_AssignFromAnother(MR_TriIntersectResult *_this, const MR_TriIntersectResult *_other)
MRC_API MR_TriIntersectResult * MR_TriIntersectResult_ConstructFromAnother(const MR_TriIntersectResult *_other)
MRC_API bool MR_isPointInLine_double(const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b)
MRC_API void MR_TriIntersectResult_DestroyArray(const MR_TriIntersectResult *_this)
Destroys a heap-allocated array of MR_TriIntersectResult. Does nothing if the pointer is null.
MRC_API const float * MR_TriIntersectResult_Get_t(const MR_TriIntersectResult *_this)
MRC_API MR_std_optional_MR_TriIntersectResult * MR_rayTriangleIntersect_float_MR_Vector3f(const MR_Vector3f *oriA, const MR_Vector3f *oriB, const MR_Vector3f *oriC, const MR_Vector3f *dir)
MRC_API bool MR_isPointInLine_float(const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b)
MRC_API bool MR_isPointInTriangle_float_MR_Vector3f(const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API bool MR_isPointInTriangle_double_MR_Vector2d(const MR_Vector2d *p, const MR_Vector2d *a, const MR_Vector2d *b, const MR_Vector2d *c)
MRC_API MR_std_optional_MR_TriIntersectResult * MR_rayTriangleIntersect_double_MR_Vector3d(const MR_Vector3d *oriA, const MR_Vector3d *oriB, const MR_Vector3d *oriC, const MR_Vector3d *dir)
MRC_API bool MR_isPointInSegm_double(const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b)
struct MR_std_optional_MR_TriIntersectResult MR_std_optional_MR_TriIntersectResult
Definition MRTriangleIntersection.h:19
MRC_API void MR_TriIntersectResult_Set_bary(MR_TriIntersectResult *_this, const MR_TriPointf *value)
MRC_API MR_std_optional_MR_TriIntersectResult * MR_rayTriangleIntersect_double_MR_IntersectionPrecomputes_double(const MR_Vector3d *oriA, const MR_Vector3d *oriB, const MR_Vector3d *oriC, const MR_IntersectionPrecomputes_double *prec)
MRC_API bool MR_isPointInTriangle_double_MR_Vector3d(const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API bool MR_isPointInTriangle_float_MR_Vector2f(const MR_Vector2f *p, const MR_Vector2f *a, const MR_Vector2f *b, const MR_Vector2f *c)
MRC_API void MR_TriIntersectResult_Destroy(const MR_TriIntersectResult *_this)
Destroys a heap-allocated instance of MR_TriIntersectResult. Does nothing if the pointer is null.
MRC_API bool MR_doTrianglesOverlap_double(const MR_Vector2d *a, const MR_Vector2d *b, const MR_Vector2d *c, const MR_Vector2d *d, const MR_Vector2d *e, const MR_Vector2d *f)
MRC_API float * MR_TriIntersectResult_GetMutable_t(MR_TriIntersectResult *_this)
MRC_API const MR_TriIntersectResult * MR_TriIntersectResult_OffsetPtr(const MR_TriIntersectResult *ptr, ptrdiff_t i)
MRC_API MR_TriPointf * MR_TriIntersectResult_GetMutable_bary(MR_TriIntersectResult *_this)
MRC_API MR_TriIntersectResult * MR_TriIntersectResult_Construct(float U, float V, float dist)
MRC_API void MR_TriIntersectResult_Set_t(MR_TriIntersectResult *_this, float value)
MRC_API const MR_TriPointf * MR_TriIntersectResult_Get_bary(const MR_TriIntersectResult *_this)
MRC_API MR_TriIntersectResult * MR_TriIntersectResult_OffsetMutablePtr(MR_TriIntersectResult *ptr, ptrdiff_t i)
#define MRC_API
Definition exports.h:11
Definition MRVector2.h:53
Definition MRVector2.h:45
Definition MRVector3.h:61
Definition MRVector3.h:52