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
22
23// a segment of straight dimensional line
27
28// a segment of straight dimensional line
32
33// a segment of straight dimensional line
37
42
48
53
58
64
69
73
78
82
86
92
100
103
106
114
119
124
129
134
139
145
150
155
161
166
170
175
179
183
189
197
200
203
211
216
221
226
231
236
242
247
252
258
263
267
272
276
280
286
294
297
300
308
313
318
323
328
333
339
344
349
355
360
364
369
373
377
383
391
394
397
405
410
415
420
425
433MRC_API bool MR_doSegmentsIntersect_MR_Vector2f(const MR_LineSegm2f *x, const MR_LineSegm2f *y, float *xPos, float *yPos);
434
442MRC_API bool MR_doSegmentsIntersect_MR_Vector2d(const MR_LineSegm2d *x, const MR_LineSegm2d *y, double *xPos, double *yPos);
443
451MRC_API bool MR_doSegmentLineIntersect_MR_Vector2f(const MR_LineSegm2f *x, const MR_Line2f *y, float *xPos, float *yPos);
452
460MRC_API bool MR_doSegmentLineIntersect_MR_Vector2d(const MR_LineSegm2d *x, const MR_Line2d *y, double *xPos, double *yPos);
461
462#ifdef __cplusplus
463} // extern "C"
464#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 exports.h:11
Definition MRVector2.h:53
Definition MRVector2.h:45
Definition MRVector3.h:61
Definition MRVector3.h:52