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
48
53MRC_API const float *MR_Ball1f_Get_center(const MR_Ball1f *_this);
54
59MRC_API void MR_Ball1f_Set_center(MR_Ball1f *_this, float value);
60
66
71MRC_API const float *MR_Ball1f_Get_radiusSq(const MR_Ball1f *_this);
72
77MRC_API void MR_Ball1f_Set_radiusSq(MR_Ball1f *_this, float value);
78
84
88
93
97MRC_API MR_Ball1f *MR_Ball1f_ConstructFrom(float center, float radiusSq);
98
101MRC_API const MR_Ball1f *MR_Ball1f_OffsetPtr(const MR_Ball1f *ptr, ptrdiff_t i);
102
106
112
115
118
126
131MRC_API bool MR_Ball1f_inside(const MR_Ball1f *_this, const float *pt);
132
137MRC_API bool MR_Ball1f_outside(const MR_Ball1f *_this, const float *pt);
138
142
147MRC_API const double *MR_Ball1d_Get_center(const MR_Ball1d *_this);
148
153MRC_API void MR_Ball1d_Set_center(MR_Ball1d *_this, double value);
154
160
165MRC_API const double *MR_Ball1d_Get_radiusSq(const MR_Ball1d *_this);
166
171MRC_API void MR_Ball1d_Set_radiusSq(MR_Ball1d *_this, double value);
172
178
182
187
191MRC_API MR_Ball1d *MR_Ball1d_ConstructFrom(double center, double radiusSq);
192
195MRC_API const MR_Ball1d *MR_Ball1d_OffsetPtr(const MR_Ball1d *ptr, ptrdiff_t i);
196
200
206
209
212
220
225MRC_API bool MR_Ball1d_inside(const MR_Ball1d *_this, const double *pt);
226
231MRC_API bool MR_Ball1d_outside(const MR_Ball1d *_this, const double *pt);
232
236
242
249
255
260MRC_API const float *MR_Ball2f_Get_radiusSq(const MR_Ball2f *_this);
261
266MRC_API void MR_Ball2f_Set_radiusSq(MR_Ball2f *_this, float value);
267
273
277
282
288
291MRC_API const MR_Ball2f *MR_Ball2f_OffsetPtr(const MR_Ball2f *ptr, ptrdiff_t i);
292
296
302
305
308
316
321MRC_API bool MR_Ball2f_inside(const MR_Ball2f *_this, const MR_Vector2f *pt);
322
327MRC_API bool MR_Ball2f_outside(const MR_Ball2f *_this, const MR_Vector2f *pt);
328
332
338
345
351
356MRC_API const double *MR_Ball2d_Get_radiusSq(const MR_Ball2d *_this);
357
362MRC_API void MR_Ball2d_Set_radiusSq(MR_Ball2d *_this, double value);
363
369
373
378
384
387MRC_API const MR_Ball2d *MR_Ball2d_OffsetPtr(const MR_Ball2d *ptr, ptrdiff_t i);
388
392
398
401
404
412
417MRC_API bool MR_Ball2d_inside(const MR_Ball2d *_this, const MR_Vector2d *pt);
418
423MRC_API bool MR_Ball2d_outside(const MR_Ball2d *_this, const MR_Vector2d *pt);
424
428
434
441
447
452MRC_API const float *MR_Ball3f_Get_radiusSq(const MR_Ball3f *_this);
453
458MRC_API void MR_Ball3f_Set_radiusSq(MR_Ball3f *_this, float value);
459
465
469
474
480
483MRC_API const MR_Ball3f *MR_Ball3f_OffsetPtr(const MR_Ball3f *ptr, ptrdiff_t i);
484
488
494
497
500
508
513MRC_API bool MR_Ball3f_inside(const MR_Ball3f *_this, const MR_Vector3f *pt);
514
519MRC_API bool MR_Ball3f_outside(const MR_Ball3f *_this, const MR_Vector3f *pt);
520
524
530
537
543
548MRC_API const double *MR_Ball3d_Get_radiusSq(const MR_Ball3d *_this);
549
554MRC_API void MR_Ball3d_Set_radiusSq(MR_Ball3d *_this, double value);
555
561
565
570
576
579MRC_API const MR_Ball3d *MR_Ball3d_OffsetPtr(const MR_Ball3d *ptr, ptrdiff_t i);
580
584
590
593
596
604
609MRC_API bool MR_Ball3d_inside(const MR_Ball3d *_this, const MR_Vector3d *pt);
610
615MRC_API bool MR_Ball3d_outside(const MR_Ball3d *_this, const MR_Vector3d *pt);
616
617#ifdef __cplusplus
618} // extern "C"
619#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)
#define MRC_API
Definition exports.h:11
Definition MRVector2.h:53
Definition MRVector2.h:45
Definition MRVector3.h:61
Definition MRVector3.h:52