MeshLib C Docs
Loading...
Searching...
No Matches
MRBall.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
14
18typedef struct MR_Ball1f MR_Ball1f;
19
23typedef struct MR_Ball1d MR_Ball1d;
24
28typedef struct MR_Ball2f MR_Ball2f;
29
33typedef struct MR_Ball2d MR_Ball2d;
34
38typedef struct MR_Ball3f MR_Ball3f;
39
43typedef struct MR_Ball3d MR_Ball3d;
44
47MRC_API const int *MR_Ball1f_Get_elements(void);
48
54MRC_API const float *MR_Ball1f_Get_center(const MR_Ball1f *_this);
55
60MRC_API void MR_Ball1f_Set_center(MR_Ball1f *_this, float value);
61
68
74MRC_API const float *MR_Ball1f_Get_radiusSq(const MR_Ball1f *_this);
75
80MRC_API void MR_Ball1f_Set_radiusSq(MR_Ball1f *_this, float value);
81
88
92
96MRC_API MR_Ball1f *MR_Ball1f_DefaultConstructArray(size_t num_elems);
97
101MRC_API MR_Ball1f *MR_Ball1f_ConstructFrom(float center, float radiusSq);
102
105MRC_API const MR_Ball1f *MR_Ball1f_OffsetPtr(const MR_Ball1f *ptr, ptrdiff_t i);
106
110
116
118MRC_API void MR_Ball1f_Destroy(const MR_Ball1f *_this);
119
121MRC_API void MR_Ball1f_DestroyArray(const MR_Ball1f *_this);
122
130
135MRC_API bool MR_Ball1f_inside(const MR_Ball1f *_this, const float *pt);
136
141MRC_API bool MR_Ball1f_outside(const MR_Ball1f *_this, const float *pt);
142
145MRC_API const int *MR_Ball1d_Get_elements(void);
146
152MRC_API const double *MR_Ball1d_Get_center(const MR_Ball1d *_this);
153
158MRC_API void MR_Ball1d_Set_center(MR_Ball1d *_this, double value);
159
166
172MRC_API const double *MR_Ball1d_Get_radiusSq(const MR_Ball1d *_this);
173
178MRC_API void MR_Ball1d_Set_radiusSq(MR_Ball1d *_this, double value);
179
186
190
195
199MRC_API MR_Ball1d *MR_Ball1d_ConstructFrom(double center, double radiusSq);
200
203MRC_API const MR_Ball1d *MR_Ball1d_OffsetPtr(const MR_Ball1d *ptr, ptrdiff_t i);
204
208
214
216MRC_API void MR_Ball1d_Destroy(const MR_Ball1d *_this);
217
219MRC_API void MR_Ball1d_DestroyArray(const MR_Ball1d *_this);
220
228
233MRC_API bool MR_Ball1d_inside(const MR_Ball1d *_this, const double *pt);
234
239MRC_API bool MR_Ball1d_outside(const MR_Ball1d *_this, const double *pt);
240
243MRC_API const int *MR_Ball2f_Get_elements(void);
244
250MRC_API const MR_Vector2f *MR_Ball2f_Get_center(const MR_Ball2f *_this);
251
257MRC_API void MR_Ball2f_Set_center(MR_Ball2f *_this, MR_Vector2f value);
258
265
271MRC_API const float *MR_Ball2f_Get_radiusSq(const MR_Ball2f *_this);
272
277MRC_API void MR_Ball2f_Set_radiusSq(MR_Ball2f *_this, float value);
278
285
289
294
299MRC_API MR_Ball2f *MR_Ball2f_ConstructFrom(MR_Vector2f center, float radiusSq);
300
303MRC_API const MR_Ball2f *MR_Ball2f_OffsetPtr(const MR_Ball2f *ptr, ptrdiff_t i);
304
308
314
316MRC_API void MR_Ball2f_Destroy(const MR_Ball2f *_this);
317
319MRC_API void MR_Ball2f_DestroyArray(const MR_Ball2f *_this);
320
328
333MRC_API bool MR_Ball2f_inside(const MR_Ball2f *_this, const MR_Vector2f *pt);
334
339MRC_API bool MR_Ball2f_outside(const MR_Ball2f *_this, const MR_Vector2f *pt);
340
343MRC_API const int *MR_Ball2d_Get_elements(void);
344
350MRC_API const MR_Vector2d *MR_Ball2d_Get_center(const MR_Ball2d *_this);
351
357MRC_API void MR_Ball2d_Set_center(MR_Ball2d *_this, MR_Vector2d value);
358
365
371MRC_API const double *MR_Ball2d_Get_radiusSq(const MR_Ball2d *_this);
372
377MRC_API void MR_Ball2d_Set_radiusSq(MR_Ball2d *_this, double value);
378
385
389
394
399MRC_API MR_Ball2d *MR_Ball2d_ConstructFrom(MR_Vector2d center, double radiusSq);
400
403MRC_API const MR_Ball2d *MR_Ball2d_OffsetPtr(const MR_Ball2d *ptr, ptrdiff_t i);
404
408
414
416MRC_API void MR_Ball2d_Destroy(const MR_Ball2d *_this);
417
419MRC_API void MR_Ball2d_DestroyArray(const MR_Ball2d *_this);
420
428
433MRC_API bool MR_Ball2d_inside(const MR_Ball2d *_this, const MR_Vector2d *pt);
434
439MRC_API bool MR_Ball2d_outside(const MR_Ball2d *_this, const MR_Vector2d *pt);
440
443MRC_API const int *MR_Ball3f_Get_elements(void);
444
450MRC_API const MR_Vector3f *MR_Ball3f_Get_center(const MR_Ball3f *_this);
451
457MRC_API void MR_Ball3f_Set_center(MR_Ball3f *_this, MR_Vector3f value);
458
465
471MRC_API const float *MR_Ball3f_Get_radiusSq(const MR_Ball3f *_this);
472
477MRC_API void MR_Ball3f_Set_radiusSq(MR_Ball3f *_this, float value);
478
485
489
494
499MRC_API MR_Ball3f *MR_Ball3f_ConstructFrom(MR_Vector3f center, float radiusSq);
500
503MRC_API const MR_Ball3f *MR_Ball3f_OffsetPtr(const MR_Ball3f *ptr, ptrdiff_t i);
504
508
514
516MRC_API void MR_Ball3f_Destroy(const MR_Ball3f *_this);
517
519MRC_API void MR_Ball3f_DestroyArray(const MR_Ball3f *_this);
520
528
533MRC_API bool MR_Ball3f_inside(const MR_Ball3f *_this, const MR_Vector3f *pt);
534
539MRC_API bool MR_Ball3f_outside(const MR_Ball3f *_this, const MR_Vector3f *pt);
540
543MRC_API const int *MR_Ball3d_Get_elements(void);
544
550MRC_API const MR_Vector3d *MR_Ball3d_Get_center(const MR_Ball3d *_this);
551
557MRC_API void MR_Ball3d_Set_center(MR_Ball3d *_this, MR_Vector3d value);
558
565
571MRC_API const double *MR_Ball3d_Get_radiusSq(const MR_Ball3d *_this);
572
577MRC_API void MR_Ball3d_Set_radiusSq(MR_Ball3d *_this, double value);
578
585
589
594
599MRC_API MR_Ball3d *MR_Ball3d_ConstructFrom(MR_Vector3d center, double radiusSq);
600
603MRC_API const MR_Ball3d *MR_Ball3d_OffsetPtr(const MR_Ball3d *ptr, ptrdiff_t i);
604
608
614
616MRC_API void MR_Ball3d_Destroy(const MR_Ball3d *_this);
617
619MRC_API void MR_Ball3d_DestroyArray(const MR_Ball3d *_this);
620
628
633MRC_API bool MR_Ball3d_inside(const MR_Ball3d *_this, const MR_Vector3d *pt);
634
639MRC_API bool MR_Ball3d_outside(const MR_Ball3d *_this, const MR_Vector3d *pt);
640
641#ifdef __cplusplus
642} // extern "C"
643#endif
MRC_API const MR_Ball1d * MR_Ball1d_OffsetPtr(const MR_Ball1d *ptr, ptrdiff_t i)
MRC_API const int * MR_Ball3d_Get_elements(void)
MRC_API const MR_Ball3f * MR_Ball3f_OffsetPtr(const MR_Ball3f *ptr, ptrdiff_t i)
MRC_API MR_Ball3f * MR_Ball3f_ConstructFromAnother(const MR_Ball3f *_other)
MRC_API MR_Ball2f * MR_Ball2f_ConstructFromAnother(const MR_Ball2f *_other)
MRC_API const int * MR_Ball2d_Get_elements(void)
MRC_API void MR_Ball2f_Set_center(MR_Ball2f *_this, MR_Vector2f value)
MRC_API MR_Ball2d * MR_Ball2d_DefaultConstructArray(size_t num_elems)
MRC_API void MR_Ball3f_Set_center(MR_Ball3f *_this, MR_Vector3f value)
MRC_API const MR_Ball2d * MR_Ball2d_OffsetPtr(const MR_Ball2d *ptr, ptrdiff_t i)
MRC_API MR_Ball1d * MR_Ball1d_DefaultConstruct(void)
MRC_API MR_Ball1f * MR_Ball1f_OffsetMutablePtr(MR_Ball1f *ptr, ptrdiff_t i)
MRC_API MR_Ball2d * MR_Ball2d_AssignFromAnother(MR_Ball2d *_this, const MR_Ball2d *_other)
MRC_API bool MR_Ball1d_outside(const MR_Ball1d *_this, const double *pt)
MRC_API void MR_Ball2d_Destroy(const MR_Ball2d *_this)
Destroys a heap-allocated instance of MR_Ball2d. Does nothing if the pointer is null.
MRC_API bool MR_Ball3f_outside(const MR_Ball3f *_this, const MR_Vector3f *pt)
MRC_API MR_Ball3d * MR_Ball3d_AssignFromAnother(MR_Ball3d *_this, const MR_Ball3d *_other)
MRC_API const int * MR_Ball1f_Get_elements(void)
MRC_API MR_Ball1f * MR_Ball1f_DefaultConstruct(void)
MRC_API double * MR_Ball2d_GetMutable_radiusSq(MR_Ball2d *_this)
struct MR_Ball2d MR_Ball2d
Definition MRBall.h:33
MRC_API MR_Ball3f * MR_Ball3f_DefaultConstruct(void)
MRC_API const int * MR_Ball3f_Get_elements(void)
MRC_API void MR_Ball1f_Set_radiusSq(MR_Ball1f *_this, float value)
MRC_API MR_Ball2d * MR_Ball2d_ConstructFrom(MR_Vector2d center, double radiusSq)
MRC_API const int * MR_Ball2f_Get_elements(void)
MRC_API const int * MR_Ball1d_Get_elements(void)
MRC_API void MR_Ball1d_DestroyArray(const MR_Ball1d *_this)
Destroys a heap-allocated array of MR_Ball1d. Does nothing if the pointer is null.
MRC_API const float * MR_Ball2f_Get_radiusSq(const MR_Ball2f *_this)
MRC_API float * MR_Ball1f_GetMutable_radiusSq(MR_Ball1f *_this)
MRC_API const MR_Vector3f * MR_Ball3f_Get_center(const MR_Ball3f *_this)
MRC_API MR_Ball1d * MR_Ball1d_OffsetMutablePtr(MR_Ball1d *ptr, ptrdiff_t i)
struct MR_Ball3d MR_Ball3d
Definition MRBall.h:43
MRC_API MR_Ball3f * MR_Ball3f_DefaultConstructArray(size_t num_elems)
MRC_API void MR_Ball2f_Set_radiusSq(MR_Ball2f *_this, float value)
MRC_API void MR_Ball1f_DestroyArray(const MR_Ball1f *_this)
Destroys a heap-allocated array of MR_Ball1f. Does nothing if the pointer is null.
MRC_API MR_Ball3f * MR_Ball3f_ConstructFrom(MR_Vector3f center, float radiusSq)
MRC_API void MR_Ball2d_DestroyArray(const MR_Ball2d *_this)
Destroys a heap-allocated array of MR_Ball2d. Does nothing if the pointer is null.
MRC_API MR_Ball3d * MR_Ball3d_ConstructFrom(MR_Vector3d center, double radiusSq)
MRC_API void MR_Ball1f_Destroy(const MR_Ball1f *_this)
Destroys a heap-allocated instance of MR_Ball1f. Does nothing if the pointer is null.
MRC_API MR_Ball1f * MR_Ball1f_DefaultConstructArray(size_t num_elems)
MRC_API bool MR_Ball1f_inside(const MR_Ball1f *_this, const float *pt)
MRC_API MR_Ball2f * MR_Ball2f_DefaultConstructArray(size_t num_elems)
MRC_API MR_Ball2d * MR_Ball2d_DefaultConstruct(void)
MRC_API MR_Ball2f * MR_Ball2f_OffsetMutablePtr(MR_Ball2f *ptr, ptrdiff_t i)
struct MR_Ball1d MR_Ball1d
Definition MRBall.h:23
MRC_API float * MR_Ball2f_GetMutable_radiusSq(MR_Ball2f *_this)
MRC_API bool MR_Ball2d_inside(const MR_Ball2d *_this, const MR_Vector2d *pt)
MRC_API double * MR_Ball1d_GetMutable_radiusSq(MR_Ball1d *_this)
MRC_API MR_Ball3d * MR_Ball3d_DefaultConstructArray(size_t num_elems)
MRC_API MR_Ball1d * MR_Ball1d_AssignFromAnother(MR_Ball1d *_this, const MR_Ball1d *_other)
MRC_API MR_Ball1d * MR_Ball1d_ConstructFrom(double center, double radiusSq)
struct MR_Ball3f MR_Ball3f
Definition MRBall.h:38
MRC_API MR_Vector2d * MR_Ball2d_GetMutable_center(MR_Ball2d *_this)
MRC_API MR_Ball2d * MR_Ball2d_ConstructFromAnother(const MR_Ball2d *_other)
MRC_API void MR_Ball1d_Set_radiusSq(MR_Ball1d *_this, double value)
MRC_API void MR_Ball2f_Destroy(const MR_Ball2f *_this)
Destroys a heap-allocated instance of MR_Ball2f. Does nothing if the pointer is null.
MRC_API const float * MR_Ball3f_Get_radiusSq(const MR_Ball3f *_this)
MRC_API const float * MR_Ball1f_Get_radiusSq(const MR_Ball1f *_this)
MRC_API bool MR_Ball1d_inside(const MR_Ball1d *_this, const double *pt)
MRC_API void MR_Ball2d_Set_radiusSq(MR_Ball2d *_this, double value)
MRC_API float * MR_Ball3f_GetMutable_radiusSq(MR_Ball3f *_this)
MRC_API void MR_Ball1f_Set_center(MR_Ball1f *_this, float value)
MRC_API void MR_Ball3f_DestroyArray(const MR_Ball3f *_this)
Destroys a heap-allocated array of MR_Ball3f. Does nothing if the pointer is null.
MRC_API MR_Ball1f * MR_Ball1f_ConstructFromAnother(const MR_Ball1f *_other)
MRC_API MR_Vector3d * MR_Ball3d_GetMutable_center(MR_Ball3d *_this)
MRC_API void MR_Ball3f_Destroy(const MR_Ball3f *_this)
Destroys a heap-allocated instance of MR_Ball3f. Does nothing if the pointer is null.
MRC_API void MR_Ball3d_Destroy(const MR_Ball3d *_this)
Destroys a heap-allocated instance of MR_Ball3d. Does nothing if the pointer is null.
MRC_API MR_Ball2d * MR_Ball2d_OffsetMutablePtr(MR_Ball2d *ptr, ptrdiff_t i)
MRC_API void MR_Ball3d_Set_center(MR_Ball3d *_this, MR_Vector3d value)
MRC_API float * MR_Ball1f_GetMutable_center(MR_Ball1f *_this)
MRC_API void MR_Ball2f_DestroyArray(const MR_Ball2f *_this)
Destroys a heap-allocated array of MR_Ball2f. Does nothing if the pointer is null.
MRC_API void MR_Ball3f_Set_radiusSq(MR_Ball3f *_this, float value)
MRC_API const double * MR_Ball3d_Get_radiusSq(const MR_Ball3d *_this)
MRC_API bool MR_Ball3d_inside(const MR_Ball3d *_this, const MR_Vector3d *pt)
MRC_API MR_Ball3f * MR_Ball3f_AssignFromAnother(MR_Ball3f *_this, const MR_Ball3f *_other)
MRC_API MR_Ball2f * MR_Ball2f_AssignFromAnother(MR_Ball2f *_this, const MR_Ball2f *_other)
MRC_API MR_Ball3d * MR_Ball3d_DefaultConstruct(void)
MRC_API MR_Ball2f * MR_Ball2f_ConstructFrom(MR_Vector2f center, float radiusSq)
MRC_API const MR_Ball2f * MR_Ball2f_OffsetPtr(const MR_Ball2f *ptr, ptrdiff_t i)
MRC_API MR_Ball2f * MR_Ball2f_DefaultConstruct(void)
MRC_API MR_Ball1d * MR_Ball1d_ConstructFromAnother(const MR_Ball1d *_other)
MRC_API const double * MR_Ball1d_Get_center(const MR_Ball1d *_this)
MRC_API MR_Ball1f * MR_Ball1f_AssignFromAnother(MR_Ball1f *_this, const MR_Ball1f *_other)
MRC_API double * MR_Ball1d_GetMutable_center(MR_Ball1d *_this)
MRC_API const MR_Ball3d * MR_Ball3d_OffsetPtr(const MR_Ball3d *ptr, ptrdiff_t i)
struct MR_Ball2f MR_Ball2f
Definition MRBall.h:28
MRC_API bool MR_Ball2d_outside(const MR_Ball2d *_this, const MR_Vector2d *pt)
MRC_API MR_Ball1f * MR_Ball1f_ConstructFrom(float center, float radiusSq)
MRC_API MR_Vector3f * MR_Ball3f_GetMutable_center(MR_Ball3f *_this)
MRC_API const MR_Vector2d * MR_Ball2d_Get_center(const MR_Ball2d *_this)
MRC_API MR_Ball1d * MR_Ball1d_DefaultConstructArray(size_t num_elems)
MRC_API const float * MR_Ball1f_Get_center(const MR_Ball1f *_this)
MRC_API const MR_Vector3d * MR_Ball3d_Get_center(const MR_Ball3d *_this)
MRC_API bool MR_Ball3d_outside(const MR_Ball3d *_this, const MR_Vector3d *pt)
MRC_API MR_Ball3d * MR_Ball3d_ConstructFromAnother(const MR_Ball3d *_other)
MRC_API void MR_Ball1d_Destroy(const MR_Ball1d *_this)
Destroys a heap-allocated instance of MR_Ball1d. Does nothing if the pointer is null.
MRC_API MR_Ball3f * MR_Ball3f_OffsetMutablePtr(MR_Ball3f *ptr, ptrdiff_t i)
MRC_API bool MR_Ball2f_outside(const MR_Ball2f *_this, const MR_Vector2f *pt)
MRC_API const MR_Vector2f * MR_Ball2f_Get_center(const MR_Ball2f *_this)
MRC_API bool MR_Ball2f_inside(const MR_Ball2f *_this, const MR_Vector2f *pt)
MRC_API const double * MR_Ball1d_Get_radiusSq(const MR_Ball1d *_this)
MRC_API void MR_Ball2d_Set_center(MR_Ball2d *_this, MR_Vector2d value)
struct MR_Ball1f MR_Ball1f
Definition MRBall.h:18
MRC_API MR_Ball3d * MR_Ball3d_OffsetMutablePtr(MR_Ball3d *ptr, ptrdiff_t i)
MRC_API void MR_Ball3d_Set_radiusSq(MR_Ball3d *_this, double value)
MRC_API const double * MR_Ball2d_Get_radiusSq(const MR_Ball2d *_this)
MRC_API void MR_Ball3d_DestroyArray(const MR_Ball3d *_this)
Destroys a heap-allocated array of MR_Ball3d. Does nothing if the pointer is null.
MRC_API bool MR_Ball3f_inside(const MR_Ball3f *_this, const MR_Vector3f *pt)
MRC_API double * MR_Ball3d_GetMutable_radiusSq(MR_Ball3d *_this)
MRC_API void MR_Ball1d_Set_center(MR_Ball1d *_this, double value)
MRC_API MR_Vector2f * MR_Ball2f_GetMutable_center(MR_Ball2f *_this)
MRC_API const MR_Ball1f * MR_Ball1f_OffsetPtr(const MR_Ball1f *ptr, ptrdiff_t i)
MRC_API bool MR_Ball1f_outside(const MR_Ball1f *_this, const float *pt)
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