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#include <stdint.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15
18typedef struct MR_Ball1f MR_Ball1f;
19
22typedef struct MR_Ball1d MR_Ball1d;
23
26typedef struct MR_Ball2f MR_Ball2f;
27
30typedef struct MR_Ball2d MR_Ball2d;
31
34typedef struct MR_Ball3f MR_Ball3f;
35
38typedef struct MR_Ball3d MR_Ball3d;
39
42MRC_API const int32_t *MR_Ball1f_Get_elements(void);
43
48MRC_API const float *MR_Ball1f_Get_center(const MR_Ball1f *_this);
49
53MRC_API void MR_Ball1f_Set_center(MR_Ball1f *_this, float value);
54
60
65MRC_API const float *MR_Ball1f_Get_radiusSq(const MR_Ball1f *_this);
66
70MRC_API void MR_Ball1f_Set_radiusSq(MR_Ball1f *_this, float value);
71
77
81
86
89MRC_API MR_Ball1f *MR_Ball1f_ConstructFrom(float center, float radiusSq);
90
92MRC_API const MR_Ball1f *MR_Ball1f_OffsetPtr(const MR_Ball1f *ptr, ptrdiff_t i);
93
96
101
104
107
113
118MRC_API bool MR_Ball1f_inside(const MR_Ball1f *_this, const float *pt);
119
124MRC_API bool MR_Ball1f_outside(const MR_Ball1f *_this, const float *pt);
125
128MRC_API const int32_t *MR_Ball1d_Get_elements(void);
129
134MRC_API const double *MR_Ball1d_Get_center(const MR_Ball1d *_this);
135
139MRC_API void MR_Ball1d_Set_center(MR_Ball1d *_this, double value);
140
146
151MRC_API const double *MR_Ball1d_Get_radiusSq(const MR_Ball1d *_this);
152
156MRC_API void MR_Ball1d_Set_radiusSq(MR_Ball1d *_this, double value);
157
163
167
172
175MRC_API MR_Ball1d *MR_Ball1d_ConstructFrom(double center, double radiusSq);
176
178MRC_API const MR_Ball1d *MR_Ball1d_OffsetPtr(const MR_Ball1d *ptr, ptrdiff_t i);
179
182
187
190
193
199
204MRC_API bool MR_Ball1d_inside(const MR_Ball1d *_this, const double *pt);
205
210MRC_API bool MR_Ball1d_outside(const MR_Ball1d *_this, const double *pt);
211
214MRC_API const int32_t *MR_Ball2f_Get_elements(void);
215
221
226
232
237MRC_API const float *MR_Ball2f_Get_radiusSq(const MR_Ball2f *_this);
238
242MRC_API void MR_Ball2f_Set_radiusSq(MR_Ball2f *_this, float value);
243
249
253
258
262
264MRC_API const MR_Ball2f *MR_Ball2f_OffsetPtr(const MR_Ball2f *ptr, ptrdiff_t i);
265
268
273
276
279
285
290MRC_API bool MR_Ball2f_inside(const MR_Ball2f *_this, const MR_Vector2f *pt);
291
296MRC_API bool MR_Ball2f_outside(const MR_Ball2f *_this, const MR_Vector2f *pt);
297
300MRC_API const int32_t *MR_Ball2d_Get_elements(void);
301
307
312
318
323MRC_API const double *MR_Ball2d_Get_radiusSq(const MR_Ball2d *_this);
324
328MRC_API void MR_Ball2d_Set_radiusSq(MR_Ball2d *_this, double value);
329
335
339
344
348
350MRC_API const MR_Ball2d *MR_Ball2d_OffsetPtr(const MR_Ball2d *ptr, ptrdiff_t i);
351
354
359
362
365
371
376MRC_API bool MR_Ball2d_inside(const MR_Ball2d *_this, const MR_Vector2d *pt);
377
382MRC_API bool MR_Ball2d_outside(const MR_Ball2d *_this, const MR_Vector2d *pt);
383
386MRC_API const int32_t *MR_Ball3f_Get_elements(void);
387
393
398
404
409MRC_API const float *MR_Ball3f_Get_radiusSq(const MR_Ball3f *_this);
410
414MRC_API void MR_Ball3f_Set_radiusSq(MR_Ball3f *_this, float value);
415
421
425
430
434
436MRC_API const MR_Ball3f *MR_Ball3f_OffsetPtr(const MR_Ball3f *ptr, ptrdiff_t i);
437
440
445
448
451
457
462MRC_API bool MR_Ball3f_inside(const MR_Ball3f *_this, const MR_Vector3f *pt);
463
468MRC_API bool MR_Ball3f_outside(const MR_Ball3f *_this, const MR_Vector3f *pt);
469
472MRC_API const int32_t *MR_Ball3d_Get_elements(void);
473
479
484
490
495MRC_API const double *MR_Ball3d_Get_radiusSq(const MR_Ball3d *_this);
496
500MRC_API void MR_Ball3d_Set_radiusSq(MR_Ball3d *_this, double value);
501
507
511
516
520
522MRC_API const MR_Ball3d *MR_Ball3d_OffsetPtr(const MR_Ball3d *ptr, ptrdiff_t i);
523
526
531
534
537
543
548MRC_API bool MR_Ball3d_inside(const MR_Ball3d *_this, const MR_Vector3d *pt);
549
554MRC_API bool MR_Ball3d_outside(const MR_Ball3d *_this, const MR_Vector3d *pt);
555
556#ifdef __cplusplus
557} // extern "C"
558#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 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 const int32_t * MR_Ball3f_Get_elements(void)
MRC_API MR_Ball2f * MR_Ball2f_ConstructFromAnother(const MR_Ball2f *_other)
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 MR_Ball1f * MR_Ball1f_DefaultConstruct(void)
MRC_API double * MR_Ball2d_GetMutable_radiusSq(MR_Ball2d *_this)
MRC_API const int32_t * MR_Ball3d_Get_elements(void)
struct MR_Ball2d MR_Ball2d
Definition MRBall.h:30
MRC_API MR_Ball3f * MR_Ball3f_DefaultConstruct(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 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 const int32_t * MR_Ball1d_Get_elements(void)
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:38
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:22
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:34
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 const int32_t * MR_Ball2d_Get_elements(void)
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 const int32_t * MR_Ball1f_Get_elements(void)
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:26
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)
MRC_API const int32_t * MR_Ball2f_Get_elements(void)
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:52
Definition MRVector2.h:44
Definition MRVector3.h:60
Definition MRVector3.h:51