MeshLib C Docs
Loading...
Searching...
No Matches
MRLineSegm.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRVector2.h>
4#include <MRCMesh/MRVector3.h>
5#include <MRCMisc/exports.h>
6
7#include <stdbool.h>
8#include <stddef.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_Line2d MR_Line2d; // Defined in `#include <MRCMesh/MRLine.h>`.
15typedef struct MR_Line2f MR_Line2f; // Defined in `#include <MRCMesh/MRLine.h>`.
16
17
18// a segment of straight dimensional line
21typedef struct MR_LineSegm2f MR_LineSegm2f;
22
23// a segment of straight dimensional line
27
28// a segment of straight dimensional line
31typedef struct MR_LineSegm3f MR_LineSegm3f;
32
33// a segment of straight dimensional line
37
43
49
55
61
67
73
77
82
86
90
96
104
107
110
118
123
128
133
138
144
150
156
162
168
174
178
183
187
191
197
205
208
211
219
224
229
234
239
245
251
257
263
269
275
279
284
288
292
298
306
309
312
320
325
330
335
340
346
352
358
364
370
376
380
385
389
393
399
407
410
413
421
426
431
436
441
449MRC_API bool MR_doSegmentsIntersect_MR_Vector2f(const MR_LineSegm2f *x, const MR_LineSegm2f *y, float *xPos, float *yPos);
450
458MRC_API bool MR_doSegmentsIntersect_MR_Vector2d(const MR_LineSegm2d *x, const MR_LineSegm2d *y, double *xPos, double *yPos);
459
467MRC_API bool MR_doSegmentLineIntersect_MR_Vector2f(const MR_LineSegm2f *x, const MR_Line2f *y, float *xPos, float *yPos);
468
476MRC_API bool MR_doSegmentLineIntersect_MR_Vector2d(const MR_LineSegm2d *x, const MR_Line2d *y, double *xPos, double *yPos);
477
478#ifdef __cplusplus
479} // extern "C"
480#endif
struct MR_LineSegm3f MR_LineSegm3f
Definition MRFeatures.h:18
struct MR_LineSegm2f MR_LineSegm2f
Definition MRIntersection.h:9
MRC_API void MR_LineSegm2d_Set_a(MR_LineSegm2d *_this, MR_Vector2d value)
MRC_API const MR_Vector2f * MR_LineSegm2f_Get_a(const MR_LineSegm2f *_this)
MRC_API MR_LineSegm2d * MR_LineSegm2d_AssignFromAnother(MR_LineSegm2d *_this, const MR_LineSegm2d *_other)
MRC_API MR_LineSegm3d * MR_LineSegm3d_DefaultConstruct(void)
MRC_API MR_LineSegm3d * MR_LineSegm3d_Construct(const MR_Vector3d *a, const MR_Vector3d *b)
MRC_API MR_Vector2f MR_LineSegm2f_call(const MR_LineSegm2f *_this, float param)
MRC_API MR_LineSegm3f * MR_LineSegm3f_ConstructFromAnother(const MR_LineSegm3f *_other)
MRC_API float MR_LineSegm3f_length(const MR_LineSegm3f *_this)
MRC_API MR_LineSegm2f * MR_LineSegm2f_AssignFromAnother(MR_LineSegm2f *_this, const MR_LineSegm2f *_other)
MRC_API const MR_Vector3f * MR_LineSegm3f_Get_a(const MR_LineSegm3f *_this)
MRC_API void MR_LineSegm3f_Set_a(MR_LineSegm3f *_this, MR_Vector3f value)
MRC_API MR_Vector2d * MR_LineSegm2d_GetMutable_b(MR_LineSegm2d *_this)
MRC_API MR_Vector3d MR_LineSegm3d_call(const MR_LineSegm3d *_this, double param)
MRC_API const MR_LineSegm2d * MR_LineSegm2d_OffsetPtr(const MR_LineSegm2d *ptr, ptrdiff_t i)
MRC_API double MR_LineSegm3d_lengthSq(const MR_LineSegm3d *_this)
MRC_API void MR_LineSegm2d_Set_b(MR_LineSegm2d *_this, MR_Vector2d value)
struct MR_LineSegm3d MR_LineSegm3d
Definition MRLineSegm.h:36
MRC_API void MR_LineSegm2d_Destroy(const MR_LineSegm2d *_this)
Destroys a heap-allocated instance of MR_LineSegm2d. Does nothing if the pointer is null.
MRC_API MR_Vector2d MR_LineSegm2d_dir(const MR_LineSegm2d *_this)
MRC_API MR_Vector3d * MR_LineSegm3d_GetMutable_a(MR_LineSegm3d *_this)
MRC_API MR_Vector3f MR_LineSegm3f_call(const MR_LineSegm3f *_this, float param)
MRC_API const MR_LineSegm3f * MR_LineSegm3f_OffsetPtr(const MR_LineSegm3f *ptr, ptrdiff_t i)
MRC_API MR_LineSegm3f * MR_LineSegm3f_OffsetMutablePtr(MR_LineSegm3f *ptr, ptrdiff_t i)
MRC_API bool MR_doSegmentsIntersect_MR_Vector2d(const MR_LineSegm2d *x, const MR_LineSegm2d *y, double *xPos, double *yPos)
MRC_API MR_LineSegm3d * MR_LineSegm3d_OffsetMutablePtr(MR_LineSegm3d *ptr, ptrdiff_t i)
MRC_API MR_LineSegm3f * MR_LineSegm3f_DefaultConstructArray(size_t num_elems)
MRC_API MR_LineSegm2f * MR_LineSegm2f_Construct(const MR_Vector2f *a, const MR_Vector2f *b)
MRC_API MR_Vector2f MR_LineSegm2f_dir(const MR_LineSegm2f *_this)
MRC_API void MR_LineSegm2f_Set_b(MR_LineSegm2f *_this, MR_Vector2f value)
MRC_API MR_Vector3f * MR_LineSegm3f_GetMutable_a(MR_LineSegm3f *_this)
MRC_API MR_LineSegm3d * MR_LineSegm3d_DefaultConstructArray(size_t num_elems)
MRC_API const MR_Vector3f * MR_LineSegm3f_Get_b(const MR_LineSegm3f *_this)
MRC_API void MR_LineSegm3d_Set_b(MR_LineSegm3d *_this, MR_Vector3d value)
MRC_API void MR_LineSegm3f_Set_b(MR_LineSegm3f *_this, MR_Vector3f value)
MRC_API MR_Vector2d MR_LineSegm2d_call(const MR_LineSegm2d *_this, double param)
MRC_API const MR_Vector3d * MR_LineSegm3d_Get_b(const MR_LineSegm3d *_this)
MRC_API MR_LineSegm3f * MR_LineSegm3f_Construct(const MR_Vector3f *a, const MR_Vector3f *b)
MRC_API void MR_LineSegm2f_DestroyArray(const MR_LineSegm2f *_this)
Destroys a heap-allocated array of MR_LineSegm2f. Does nothing if the pointer is null.
MRC_API bool MR_doSegmentLineIntersect_MR_Vector2f(const MR_LineSegm2f *x, const MR_Line2f *y, float *xPos, float *yPos)
MRC_API MR_Vector3d MR_LineSegm3d_dir(const MR_LineSegm3d *_this)
MRC_API void MR_LineSegm3f_DestroyArray(const MR_LineSegm3f *_this)
Destroys a heap-allocated array of MR_LineSegm3f. Does nothing if the pointer is null.
MRC_API float MR_LineSegm2f_length(const MR_LineSegm2f *_this)
MRC_API MR_LineSegm2f * MR_LineSegm2f_DefaultConstructArray(size_t num_elems)
MRC_API MR_LineSegm3f * MR_LineSegm3f_DefaultConstruct(void)
MRC_API MR_Vector2f * MR_LineSegm2f_GetMutable_b(MR_LineSegm2f *_this)
MRC_API MR_LineSegm3d * MR_LineSegm3d_ConstructFromAnother(const MR_LineSegm3d *_other)
MRC_API MR_LineSegm3d * MR_LineSegm3d_AssignFromAnother(MR_LineSegm3d *_this, const MR_LineSegm3d *_other)
MRC_API float MR_LineSegm2f_lengthSq(const MR_LineSegm2f *_this)
MRC_API double MR_LineSegm2d_length(const MR_LineSegm2d *_this)
MRC_API void MR_LineSegm2d_DestroyArray(const MR_LineSegm2d *_this)
Destroys a heap-allocated array of MR_LineSegm2d. Does nothing if the pointer is null.
MRC_API void MR_LineSegm3d_Destroy(const MR_LineSegm3d *_this)
Destroys a heap-allocated instance of MR_LineSegm3d. Does nothing if the pointer is null.
MRC_API MR_Vector2d * MR_LineSegm2d_GetMutable_a(MR_LineSegm2d *_this)
MRC_API MR_LineSegm2f * MR_LineSegm2f_DefaultConstruct(void)
MRC_API bool MR_doSegmentLineIntersect_MR_Vector2d(const MR_LineSegm2d *x, const MR_Line2d *y, double *xPos, double *yPos)
MRC_API void MR_LineSegm3d_DestroyArray(const MR_LineSegm3d *_this)
Destroys a heap-allocated array of MR_LineSegm3d. Does nothing if the pointer is null.
MRC_API double MR_LineSegm3d_length(const MR_LineSegm3d *_this)
MRC_API const MR_Vector2d * MR_LineSegm2d_Get_b(const MR_LineSegm2d *_this)
MRC_API MR_LineSegm3f * MR_LineSegm3f_AssignFromAnother(MR_LineSegm3f *_this, const MR_LineSegm3f *_other)
MRC_API MR_LineSegm2f * MR_LineSegm2f_ConstructFromAnother(const MR_LineSegm2f *_other)
MRC_API void MR_LineSegm3f_Destroy(const MR_LineSegm3f *_this)
Destroys a heap-allocated instance of MR_LineSegm3f. Does nothing if the pointer is null.
MRC_API float MR_LineSegm3f_lengthSq(const MR_LineSegm3f *_this)
MRC_API const MR_Vector3d * MR_LineSegm3d_Get_a(const MR_LineSegm3d *_this)
MRC_API void MR_LineSegm3d_Set_a(MR_LineSegm3d *_this, MR_Vector3d value)
MRC_API bool MR_doSegmentsIntersect_MR_Vector2f(const MR_LineSegm2f *x, const MR_LineSegm2f *y, float *xPos, float *yPos)
MRC_API double MR_LineSegm2d_lengthSq(const MR_LineSegm2d *_this)
MRC_API MR_LineSegm2f * MR_LineSegm2f_OffsetMutablePtr(MR_LineSegm2f *ptr, ptrdiff_t i)
MRC_API MR_Vector3f MR_LineSegm3f_dir(const MR_LineSegm3f *_this)
MRC_API const MR_Vector2f * MR_LineSegm2f_Get_b(const MR_LineSegm2f *_this)
MRC_API const MR_Vector2d * MR_LineSegm2d_Get_a(const MR_LineSegm2d *_this)
MRC_API MR_LineSegm2d * MR_LineSegm2d_DefaultConstruct(void)
MRC_API MR_Vector3f * MR_LineSegm3f_GetMutable_b(MR_LineSegm3f *_this)
MRC_API MR_LineSegm2d * MR_LineSegm2d_DefaultConstructArray(size_t num_elems)
MRC_API void MR_LineSegm2f_Destroy(const MR_LineSegm2f *_this)
Destroys a heap-allocated instance of MR_LineSegm2f. Does nothing if the pointer is null.
MRC_API MR_Vector2f * MR_LineSegm2f_GetMutable_a(MR_LineSegm2f *_this)
MRC_API void MR_LineSegm2f_Set_a(MR_LineSegm2f *_this, MR_Vector2f value)
struct MR_LineSegm2d MR_LineSegm2d
Definition MRLineSegm.h:26
MRC_API const MR_LineSegm2f * MR_LineSegm2f_OffsetPtr(const MR_LineSegm2f *ptr, ptrdiff_t i)
MRC_API MR_LineSegm2d * MR_LineSegm2d_Construct(const MR_Vector2d *a, const MR_Vector2d *b)
MRC_API MR_LineSegm2d * MR_LineSegm2d_OffsetMutablePtr(MR_LineSegm2d *ptr, ptrdiff_t i)
MRC_API MR_LineSegm2d * MR_LineSegm2d_ConstructFromAnother(const MR_LineSegm2d *_other)
MRC_API const MR_LineSegm3d * MR_LineSegm3d_OffsetPtr(const MR_LineSegm3d *ptr, ptrdiff_t i)
MRC_API MR_Vector3d * MR_LineSegm3d_GetMutable_b(MR_LineSegm3d *_this)
struct MR_Line2f MR_Line2f
Definition MRLine.h:20
struct MR_Line2d MR_Line2d
Definition MRLine.h:25
#define MRC_API
Definition include/MRCMisc/exports.h:11
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