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
42MRC_API const MR_Vector2f *MR_LineSegm2f_Get_a(const MR_LineSegm2f *_this);
43
48MRC_API void MR_LineSegm2f_Set_a(MR_LineSegm2f *_this, MR_Vector2f value);
49
55
60MRC_API const MR_Vector2f *MR_LineSegm2f_Get_b(const MR_LineSegm2f *_this);
61
66MRC_API void MR_LineSegm2f_Set_b(MR_LineSegm2f *_this, MR_Vector2f value);
67
73
77
82
85MRC_API const MR_LineSegm2f *MR_LineSegm2f_OffsetPtr(const MR_LineSegm2f *ptr, ptrdiff_t i);
86
90
96
104
106MRC_API void MR_LineSegm2f_Destroy(const MR_LineSegm2f *_this);
107
109MRC_API void MR_LineSegm2f_DestroyArray(const MR_LineSegm2f *_this);
110
118
123
127MRC_API float MR_LineSegm2f_lengthSq(const MR_LineSegm2f *_this);
128
132MRC_API float MR_LineSegm2f_length(const MR_LineSegm2f *_this);
133
137MRC_API MR_Vector2f MR_LineSegm2f_call(const MR_LineSegm2f *_this, float param);
138
143MRC_API const MR_Vector2d *MR_LineSegm2d_Get_a(const MR_LineSegm2d *_this);
144
150
156
161MRC_API const MR_Vector2d *MR_LineSegm2d_Get_b(const MR_LineSegm2d *_this);
162
168
174
178
183
186MRC_API const MR_LineSegm2d *MR_LineSegm2d_OffsetPtr(const MR_LineSegm2d *ptr, ptrdiff_t i);
187
191
197
205
207MRC_API void MR_LineSegm2d_Destroy(const MR_LineSegm2d *_this);
208
210MRC_API void MR_LineSegm2d_DestroyArray(const MR_LineSegm2d *_this);
211
219
224
228MRC_API double MR_LineSegm2d_lengthSq(const MR_LineSegm2d *_this);
229
233MRC_API double MR_LineSegm2d_length(const MR_LineSegm2d *_this);
234
238MRC_API MR_Vector2d MR_LineSegm2d_call(const MR_LineSegm2d *_this, double param);
239
244MRC_API const MR_Vector3f *MR_LineSegm3f_Get_a(const MR_LineSegm3f *_this);
245
251
257
262MRC_API const MR_Vector3f *MR_LineSegm3f_Get_b(const MR_LineSegm3f *_this);
263
269
275
279
284
287MRC_API const MR_LineSegm3f *MR_LineSegm3f_OffsetPtr(const MR_LineSegm3f *ptr, ptrdiff_t i);
288
292
298
306
308MRC_API void MR_LineSegm3f_Destroy(const MR_LineSegm3f *_this);
309
311MRC_API void MR_LineSegm3f_DestroyArray(const MR_LineSegm3f *_this);
312
320
325
329MRC_API float MR_LineSegm3f_lengthSq(const MR_LineSegm3f *_this);
330
334MRC_API float MR_LineSegm3f_length(const MR_LineSegm3f *_this);
335
339MRC_API MR_Vector3f MR_LineSegm3f_call(const MR_LineSegm3f *_this, float param);
340
345MRC_API const MR_Vector3d *MR_LineSegm3d_Get_a(const MR_LineSegm3d *_this);
346
352
358
363MRC_API const MR_Vector3d *MR_LineSegm3d_Get_b(const MR_LineSegm3d *_this);
364
370
376
380
385
388MRC_API const MR_LineSegm3d *MR_LineSegm3d_OffsetPtr(const MR_LineSegm3d *ptr, ptrdiff_t i);
389
393
399
407
409MRC_API void MR_LineSegm3d_Destroy(const MR_LineSegm3d *_this);
410
412MRC_API void MR_LineSegm3d_DestroyArray(const MR_LineSegm3d *_this);
413
421
426
430MRC_API double MR_LineSegm3d_lengthSq(const MR_LineSegm3d *_this);
431
435MRC_API double MR_LineSegm3d_length(const MR_LineSegm3d *_this);
436
440MRC_API MR_Vector3d MR_LineSegm3d_call(const MR_LineSegm3d *_this, double param);
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
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