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
32
33// barycentric representation
40
41// barycentric representation
47
48// distance from ray origin to p in dir length units
53MRC_API const float *MR_TriIntersectResult_Get_t(const MR_TriIntersectResult *_this);
54
55// distance from ray origin to p in dir length units
59MRC_API void MR_TriIntersectResult_Set_t(MR_TriIntersectResult *_this, float value);
60
61// distance from ray origin to p in dir length units
67
73
77
81
84MRC_API MR_TriIntersectResult *MR_TriIntersectResult_Construct(float U, float V, float dist);
85
88
91
99
106MRC_API bool MR_isPointInPlane_float(const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c);
107
114MRC_API bool MR_isPointInPlane_double(const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c);
115
121MRC_API bool MR_isPointInLine_float(const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b);
122
128MRC_API bool MR_isPointInLine_double(const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b);
129
135MRC_API bool MR_isPointInSegm_float(const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b);
136
142MRC_API bool MR_isPointInSegm_double(const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b);
143
150MRC_API bool MR_isPointInTriangle_float_MR_Vector3f(const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c);
151
158MRC_API bool MR_isPointInTriangle_double_MR_Vector3d(const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c);
159
166MRC_API bool MR_isPointInTriangle_float_MR_Vector2f(const MR_Vector2f *p, const MR_Vector2f *a, const MR_Vector2f *b, const MR_Vector2f *c);
167
174MRC_API bool MR_isPointInTriangle_double_MR_Vector2d(const MR_Vector2d *p, const MR_Vector2d *a, const MR_Vector2d *b, const MR_Vector2d *c);
175
183
191
199
207
216MRC_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);
217
226MRC_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);
227
228#ifdef __cplusplus
229} // extern "C"
230#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)
Generated from class MR::Vector2d.
Definition MRVector2.h:43
Generated from class MR::Vector2f.
Definition MRVector2.h:36
Generated from class MR::Vector3d.
Definition MRVector3.h:55
Generated from class MR::Vector3f.
Definition MRVector3.h:47