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
58MRC_API void MR_Ball1f_Set_center(MR_Ball1f *_this, float value);
59
65
70MRC_API const float *MR_Ball1f_Get_radiusSq(const MR_Ball1f *_this);
71
75MRC_API void MR_Ball1f_Set_radiusSq(MR_Ball1f *_this, float value);
76
82
86
91
94MRC_API MR_Ball1f *MR_Ball1f_ConstructFrom(float center, float radiusSq);
95
97MRC_API const MR_Ball1f *MR_Ball1f_OffsetPtr(const MR_Ball1f *ptr, ptrdiff_t i);
98
101
106
109
112
118
123MRC_API bool MR_Ball1f_inside(const MR_Ball1f *_this, const float *pt);
124
129MRC_API bool MR_Ball1f_outside(const MR_Ball1f *_this, const float *pt);
130
134
139MRC_API const double *MR_Ball1d_Get_center(const MR_Ball1d *_this);
140
144MRC_API void MR_Ball1d_Set_center(MR_Ball1d *_this, double value);
145
151
156MRC_API const double *MR_Ball1d_Get_radiusSq(const MR_Ball1d *_this);
157
161MRC_API void MR_Ball1d_Set_radiusSq(MR_Ball1d *_this, double value);
162
168
172
177
180MRC_API MR_Ball1d *MR_Ball1d_ConstructFrom(double center, double radiusSq);
181
183MRC_API const MR_Ball1d *MR_Ball1d_OffsetPtr(const MR_Ball1d *ptr, ptrdiff_t i);
184
187
192
195
198
204
209MRC_API bool MR_Ball1d_inside(const MR_Ball1d *_this, const double *pt);
210
215MRC_API bool MR_Ball1d_outside(const MR_Ball1d *_this, const double *pt);
216
220
226
231
237
242MRC_API const float *MR_Ball2f_Get_radiusSq(const MR_Ball2f *_this);
243
247MRC_API void MR_Ball2f_Set_radiusSq(MR_Ball2f *_this, float value);
248
254
258
263
267
269MRC_API const MR_Ball2f *MR_Ball2f_OffsetPtr(const MR_Ball2f *ptr, ptrdiff_t i);
270
273
278
281
284
290
295MRC_API bool MR_Ball2f_inside(const MR_Ball2f *_this, const MR_Vector2f *pt);
296
301MRC_API bool MR_Ball2f_outside(const MR_Ball2f *_this, const MR_Vector2f *pt);
302
306
312
317
323
328MRC_API const double *MR_Ball2d_Get_radiusSq(const MR_Ball2d *_this);
329
333MRC_API void MR_Ball2d_Set_radiusSq(MR_Ball2d *_this, double value);
334
340
344
349
353
355MRC_API const MR_Ball2d *MR_Ball2d_OffsetPtr(const MR_Ball2d *ptr, ptrdiff_t i);
356
359
364
367
370
376
381MRC_API bool MR_Ball2d_inside(const MR_Ball2d *_this, const MR_Vector2d *pt);
382
387MRC_API bool MR_Ball2d_outside(const MR_Ball2d *_this, const MR_Vector2d *pt);
388
392
398
403
409
414MRC_API const float *MR_Ball3f_Get_radiusSq(const MR_Ball3f *_this);
415
419MRC_API void MR_Ball3f_Set_radiusSq(MR_Ball3f *_this, float value);
420
426
430
435
439
441MRC_API const MR_Ball3f *MR_Ball3f_OffsetPtr(const MR_Ball3f *ptr, ptrdiff_t i);
442
445
450
453
456
462
467MRC_API bool MR_Ball3f_inside(const MR_Ball3f *_this, const MR_Vector3f *pt);
468
473MRC_API bool MR_Ball3f_outside(const MR_Ball3f *_this, const MR_Vector3f *pt);
474
478
484
489
495
500MRC_API const double *MR_Ball3d_Get_radiusSq(const MR_Ball3d *_this);
501
505MRC_API void MR_Ball3d_Set_radiusSq(MR_Ball3d *_this, double value);
506
512
516
521
525
527MRC_API const MR_Ball3d *MR_Ball3d_OffsetPtr(const MR_Ball3d *ptr, ptrdiff_t i);
528
531
536
539
542
548
553MRC_API bool MR_Ball3d_inside(const MR_Ball3d *_this, const MR_Vector3d *pt);
554
559MRC_API bool MR_Ball3d_outside(const MR_Ball3d *_this, const MR_Vector3d *pt);
560
561#ifdef __cplusplus
562} // extern "C"
563#endif
MRC_API const MR_Ball1d * MR_Ball1d_OffsetPtr(const MR_Ball1d *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API const int * MR_Ball3d_Get_elements(void)
MRC_API const MR_Ball3f * MR_Ball3f_OffsetPtr(const MR_Ball3f *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_Ball1d * MR_Ball1d_DefaultConstruct(void)
MRC_API MR_Ball1f * MR_Ball1f_OffsetMutablePtr(MR_Ball1f *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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