MeshLib C Docs
Loading...
Searching...
No Matches
MRLine.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 <stddef.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef struct MR_std_istream MR_std_istream; // Defined in `#include <MRCMisc/iostream.h>`.
14typedef struct MR_std_ostream MR_std_ostream; // Defined in `#include <MRCMisc/iostream.h>`.
15
16
20typedef struct MR_Line2f MR_Line2f;
21
25typedef struct MR_Line2d MR_Line2d;
26
30typedef struct MR_Line3f MR_Line3f;
31
35typedef struct MR_Line3d MR_Line3d;
36
41MRC_API const MR_Vector2f *MR_Line2f_Get_p(const MR_Line2f *_this);
42
47MRC_API void MR_Line2f_Set_p(MR_Line2f *_this, MR_Vector2f value);
48
54
59MRC_API const MR_Vector2f *MR_Line2f_Get_d(const MR_Line2f *_this);
60
65MRC_API void MR_Line2f_Set_d(MR_Line2f *_this, MR_Vector2f value);
66
72
76
80MRC_API MR_Line2f *MR_Line2f_DefaultConstructArray(size_t num_elems);
81
84MRC_API const MR_Line2f *MR_Line2f_OffsetPtr(const MR_Line2f *ptr, ptrdiff_t i);
85
89
95
103
105MRC_API void MR_Line2f_Destroy(const MR_Line2f *_this);
106
108MRC_API void MR_Line2f_DestroyArray(const MR_Line2f *_this);
109
117
121MRC_API MR_Vector2f MR_Line2f_call(const MR_Line2f *_this, float param);
122
127MRC_API float MR_Line2f_distanceSq(const MR_Line2f *_this, const MR_Vector2f *x);
128
133MRC_API MR_Line2f *MR_neg_MR_Line2f(const MR_Line2f *_this);
134
139MRC_API const MR_Line2f *MR_pos_MR_Line2f(const MR_Line2f *_this);
140
146
151MRC_API MR_Vector2f MR_Line2f_project(const MR_Line2f *_this, const MR_Vector2f *x);
152
158
164
169MRC_API const MR_Vector2d *MR_Line2d_Get_p(const MR_Line2d *_this);
170
175MRC_API void MR_Line2d_Set_p(MR_Line2d *_this, MR_Vector2d value);
176
182
187MRC_API const MR_Vector2d *MR_Line2d_Get_d(const MR_Line2d *_this);
188
193MRC_API void MR_Line2d_Set_d(MR_Line2d *_this, MR_Vector2d value);
194
200
204
209
212MRC_API const MR_Line2d *MR_Line2d_OffsetPtr(const MR_Line2d *ptr, ptrdiff_t i);
213
217
223
231
233MRC_API void MR_Line2d_Destroy(const MR_Line2d *_this);
234
236MRC_API void MR_Line2d_DestroyArray(const MR_Line2d *_this);
237
245
249MRC_API MR_Vector2d MR_Line2d_call(const MR_Line2d *_this, double param);
250
255MRC_API double MR_Line2d_distanceSq(const MR_Line2d *_this, const MR_Vector2d *x);
256
261MRC_API MR_Line2d *MR_neg_MR_Line2d(const MR_Line2d *_this);
262
267MRC_API const MR_Line2d *MR_pos_MR_Line2d(const MR_Line2d *_this);
268
274
279MRC_API MR_Vector2d MR_Line2d_project(const MR_Line2d *_this, const MR_Vector2d *x);
280
286
292
297MRC_API const MR_Vector3f *MR_Line3f_Get_p(const MR_Line3f *_this);
298
303MRC_API void MR_Line3f_Set_p(MR_Line3f *_this, MR_Vector3f value);
304
310
315MRC_API const MR_Vector3f *MR_Line3f_Get_d(const MR_Line3f *_this);
316
321MRC_API void MR_Line3f_Set_d(MR_Line3f *_this, MR_Vector3f value);
322
328
332
337
340MRC_API const MR_Line3f *MR_Line3f_OffsetPtr(const MR_Line3f *ptr, ptrdiff_t i);
341
345
351
359
365
367MRC_API void MR_Line3f_Destroy(const MR_Line3f *_this);
368
370MRC_API void MR_Line3f_DestroyArray(const MR_Line3f *_this);
371
379
383MRC_API MR_Vector3f MR_Line3f_call(const MR_Line3f *_this, float param);
384
389MRC_API float MR_Line3f_distanceSq(const MR_Line3f *_this, const MR_Vector3f *x);
390
395MRC_API MR_Line3f *MR_neg_MR_Line3f(const MR_Line3f *_this);
396
401MRC_API const MR_Line3f *MR_pos_MR_Line3f(const MR_Line3f *_this);
402
408
413MRC_API MR_Vector3f MR_Line3f_project(const MR_Line3f *_this, const MR_Vector3f *x);
414
420
426
431MRC_API const MR_Vector3d *MR_Line3d_Get_p(const MR_Line3d *_this);
432
437MRC_API void MR_Line3d_Set_p(MR_Line3d *_this, MR_Vector3d value);
438
444
449MRC_API const MR_Vector3d *MR_Line3d_Get_d(const MR_Line3d *_this);
450
455MRC_API void MR_Line3d_Set_d(MR_Line3d *_this, MR_Vector3d value);
456
462
466
471
474MRC_API const MR_Line3d *MR_Line3d_OffsetPtr(const MR_Line3d *ptr, ptrdiff_t i);
475
479
485
493
495MRC_API void MR_Line3d_Destroy(const MR_Line3d *_this);
496
498MRC_API void MR_Line3d_DestroyArray(const MR_Line3d *_this);
499
507
511MRC_API MR_Vector3d MR_Line3d_call(const MR_Line3d *_this, double param);
512
517MRC_API double MR_Line3d_distanceSq(const MR_Line3d *_this, const MR_Vector3d *x);
518
523MRC_API MR_Line3d *MR_neg_MR_Line3d(const MR_Line3d *_this);
524
529MRC_API const MR_Line3d *MR_pos_MR_Line3d(const MR_Line3d *_this);
530
536
541MRC_API MR_Vector3d MR_Line3d_project(const MR_Line3d *_this, const MR_Vector3d *x);
542
548
554
555#ifdef __cplusplus
556} // extern "C"
557#endif
struct MR_Line3d MR_Line3d
Definition MRBestFit.h:16
struct MR_Line3f MR_Line3f
Definition MRBestFit.h:17
struct MR_std_ostream MR_std_ostream
Definition MRCtm.h:31
struct MR_std_istream MR_std_istream
Definition MRCtm.h:28
MRC_API MR_Line3d * MR_Line3d_Construct(const MR_Vector3d *p, const MR_Vector3d *d)
MRC_API MR_std_istream * MR_input_MR_Line3d(MR_std_istream *s, MR_Line3d *l)
MRC_API void MR_Line2d_Set_p(MR_Line2d *_this, MR_Vector2d value)
MRC_API MR_Vector2d MR_Line2d_call(const MR_Line2d *_this, double param)
MRC_API MR_Vector3d * MR_Line3d_GetMutable_d(MR_Line3d *_this)
MRC_API MR_Line2d * MR_Line2d_AssignFromAnother(MR_Line2d *_this, const MR_Line2d *_other)
MRC_API float MR_Line2f_distanceSq(const MR_Line2f *_this, const MR_Vector2f *x)
MRC_API MR_Line2d * MR_Line2d_DefaultConstruct(void)
MRC_API MR_Vector2f MR_Line2f_project(const MR_Line2f *_this, const MR_Vector2f *x)
MRC_API MR_Vector3f * MR_Line3f_GetMutable_p(MR_Line3f *_this)
MRC_API MR_Line2f * MR_Line2f_OffsetMutablePtr(MR_Line2f *ptr, ptrdiff_t i)
MRC_API MR_Line3d * MR_Line3d_normalized(const MR_Line3d *_this)
MRC_API const MR_Vector3f * MR_Line3f_Get_p(const MR_Line3f *_this)
MRC_API MR_Vector2f * MR_Line2f_GetMutable_p(MR_Line2f *_this)
MRC_API void MR_Line2f_DestroyArray(const MR_Line2f *_this)
Destroys a heap-allocated array of MR_Line2f. Does nothing if the pointer is null.
MRC_API const MR_Vector3d * MR_Line3d_Get_d(const MR_Line3d *_this)
MRC_API MR_Vector3d MR_Line3d_call(const MR_Line3d *_this, double param)
MRC_API void MR_Line3f_Set_d(MR_Line3f *_this, MR_Vector3f value)
struct MR_Line2f MR_Line2f
Definition MRLine.h:20
MRC_API MR_Line3f * MR_Line3f_DefaultConstruct(void)
MRC_API void MR_Line3d_DestroyArray(const MR_Line3d *_this)
Destroys a heap-allocated array of MR_Line3d. Does nothing if the pointer is null.
MRC_API double MR_Line2d_distanceSq(const MR_Line2d *_this, const MR_Vector2d *x)
MRC_API void MR_Line2f_Set_d(MR_Line2f *_this, MR_Vector2f value)
MRC_API MR_Line3f * MR_Line3f_DefaultConstructArray(size_t num_elems)
MRC_API void MR_Line2d_DestroyArray(const MR_Line2d *_this)
Destroys a heap-allocated array of MR_Line2d. Does nothing if the pointer is null.
MRC_API MR_Line3d * MR_Line3d_AssignFromAnother(MR_Line3d *_this, const MR_Line3d *_other)
MRC_API void MR_Line2d_Set_d(MR_Line2d *_this, MR_Vector2d value)
MRC_API const MR_Line2d * MR_pos_MR_Line2d(const MR_Line2d *_this)
MRC_API MR_Line3f * MR_Line3f_Construct_MR_Vector3d(const MR_Line3d *l)
MRC_API const MR_Line3f * MR_Line3f_OffsetPtr(const MR_Line3f *ptr, ptrdiff_t i)
MRC_API void MR_Line3d_Destroy(const MR_Line3d *_this)
Destroys a heap-allocated instance of MR_Line3d. Does nothing if the pointer is null.
MRC_API MR_Line2f * MR_Line2f_DefaultConstruct(void)
MRC_API float MR_Line3f_distanceSq(const MR_Line3f *_this, const MR_Vector3f *x)
MRC_API MR_Vector3f MR_Line3f_project(const MR_Line3f *_this, const MR_Vector3f *x)
MRC_API MR_Line3d * MR_Line3d_OffsetMutablePtr(MR_Line3d *ptr, ptrdiff_t i)
MRC_API void MR_Line3d_Set_d(MR_Line3d *_this, MR_Vector3d value)
MRC_API void MR_Line3f_Set_p(MR_Line3f *_this, MR_Vector3f value)
MRC_API MR_std_istream * MR_input_MR_Line2f(MR_std_istream *s, MR_Line2f *l)
struct MR_Line2d MR_Line2d
Definition MRLine.h:25
MRC_API const MR_Line3d * MR_pos_MR_Line3d(const MR_Line3d *_this)
MRC_API MR_Vector2d * MR_Line2d_GetMutable_d(MR_Line2d *_this)
MRC_API MR_std_ostream * MR_print_MR_Line3d(MR_std_ostream *s, const MR_Line3d *l)
MRC_API MR_Line3d * MR_Line3d_DefaultConstruct(void)
MRC_API MR_Line2f * MR_Line2f_AssignFromAnother(MR_Line2f *_this, const MR_Line2f *_other)
MRC_API MR_Line2d * MR_Line2d_OffsetMutablePtr(MR_Line2d *ptr, ptrdiff_t i)
MRC_API MR_Line2f * MR_Line2f_Construct(const MR_Vector2f *p, const MR_Vector2f *d)
MRC_API MR_Line3d * MR_Line3d_ConstructFromAnother(const MR_Line3d *_other)
MRC_API void MR_Line3d_Set_p(MR_Line3d *_this, MR_Vector3d value)
MRC_API const MR_Line2f * MR_Line2f_OffsetPtr(const MR_Line2f *ptr, ptrdiff_t i)
MRC_API void MR_Line2f_Destroy(const MR_Line2f *_this)
Destroys a heap-allocated instance of MR_Line2f. Does nothing if the pointer is null.
MRC_API MR_Vector2f * MR_Line2f_GetMutable_d(MR_Line2f *_this)
MRC_API MR_std_ostream * MR_print_MR_Line3f(MR_std_ostream *s, const MR_Line3f *l)
MRC_API const MR_Vector3d * MR_Line3d_Get_p(const MR_Line3d *_this)
MRC_API double MR_Line3d_distanceSq(const MR_Line3d *_this, const MR_Vector3d *x)
MRC_API const MR_Line2f * MR_pos_MR_Line2f(const MR_Line2f *_this)
MRC_API MR_Line2f * MR_neg_MR_Line2f(const MR_Line2f *_this)
MRC_API const MR_Line3f * MR_pos_MR_Line3f(const MR_Line3f *_this)
MRC_API const MR_Line3d * MR_Line3d_OffsetPtr(const MR_Line3d *ptr, ptrdiff_t i)
MRC_API MR_std_ostream * MR_print_MR_Line2d(MR_std_ostream *s, const MR_Line2d *l)
MRC_API MR_Line3f * MR_Line3f_Construct(const MR_Vector3f *p, const MR_Vector3f *d)
MRC_API const MR_Vector2d * MR_Line2d_Get_p(const MR_Line2d *_this)
MRC_API MR_Line2f * MR_Line2f_DefaultConstructArray(size_t num_elems)
MRC_API MR_Line2d * MR_Line2d_DefaultConstructArray(size_t num_elems)
MRC_API const MR_Vector2d * MR_Line2d_Get_d(const MR_Line2d *_this)
MRC_API MR_Line3f * MR_Line3f_normalized(const MR_Line3f *_this)
MRC_API const MR_Vector2f * MR_Line2f_Get_d(const MR_Line2f *_this)
MRC_API MR_Line3f * MR_Line3f_ConstructFromAnother(const MR_Line3f *_other)
MRC_API const MR_Vector3f * MR_Line3f_Get_d(const MR_Line3f *_this)
MRC_API MR_Line3f * MR_Line3f_OffsetMutablePtr(MR_Line3f *ptr, ptrdiff_t i)
MRC_API const MR_Line2d * MR_Line2d_OffsetPtr(const MR_Line2d *ptr, ptrdiff_t i)
MRC_API MR_Vector3f MR_Line3f_call(const MR_Line3f *_this, float param)
MRC_API MR_Line2d * MR_Line2d_ConstructFromAnother(const MR_Line2d *_other)
MRC_API void MR_Line2f_Set_p(MR_Line2f *_this, MR_Vector2f value)
MRC_API MR_Line3f * MR_neg_MR_Line3f(const MR_Line3f *_this)
MRC_API MR_Line2f * MR_Line2f_ConstructFromAnother(const MR_Line2f *_other)
MRC_API MR_std_istream * MR_input_MR_Line2d(MR_std_istream *s, MR_Line2d *l)
MRC_API MR_Vector3d MR_Line3d_project(const MR_Line3d *_this, const MR_Vector3d *x)
MRC_API MR_std_ostream * MR_print_MR_Line2f(MR_std_ostream *s, const MR_Line2f *l)
MRC_API MR_Line2d * MR_Line2d_normalized(const MR_Line2d *_this)
MRC_API MR_Line3d * MR_neg_MR_Line3d(const MR_Line3d *_this)
MRC_API const MR_Vector2f * MR_Line2f_Get_p(const MR_Line2f *_this)
MRC_API MR_Vector3f * MR_Line3f_GetMutable_d(MR_Line3f *_this)
MRC_API MR_Vector2d * MR_Line2d_GetMutable_p(MR_Line2d *_this)
MRC_API MR_Line3d * MR_Line3d_DefaultConstructArray(size_t num_elems)
MRC_API MR_Vector2f MR_Line2f_call(const MR_Line2f *_this, float param)
MRC_API MR_std_istream * MR_input_MR_Line3f(MR_std_istream *s, MR_Line3f *l)
MRC_API MR_Vector3d * MR_Line3d_GetMutable_p(MR_Line3d *_this)
MRC_API MR_Line2d * MR_Line2d_Construct(const MR_Vector2d *p, const MR_Vector2d *d)
MRC_API void MR_Line3f_Destroy(const MR_Line3f *_this)
Destroys a heap-allocated instance of MR_Line3f. Does nothing if the pointer is null.
MRC_API MR_Line2d * MR_neg_MR_Line2d(const MR_Line2d *_this)
MRC_API MR_Line3f * MR_Line3f_AssignFromAnother(MR_Line3f *_this, const MR_Line3f *_other)
MRC_API void MR_Line2d_Destroy(const MR_Line2d *_this)
Destroys a heap-allocated instance of MR_Line2d. Does nothing if the pointer is null.
MRC_API MR_Line2f * MR_Line2f_normalized(const MR_Line2f *_this)
MRC_API MR_Vector2d MR_Line2d_project(const MR_Line2d *_this, const MR_Vector2d *x)
MRC_API void MR_Line3f_DestroyArray(const MR_Line3f *_this)
Destroys a heap-allocated array of MR_Line3f. Does nothing if the pointer is null.
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