MeshLib C Docs
Loading...
Searching...
No Matches
MRSphere.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
17typedef struct MR_Sphere2f MR_Sphere2f;
18
21typedef struct MR_Sphere2d MR_Sphere2d;
22
25typedef struct MR_Sphere3f MR_Sphere3f;
26
29typedef struct MR_Sphere3d MR_Sphere3d;
30
35MRC_API const MR_Vector2f *MR_Sphere2f_Get_center(const MR_Sphere2f *_this);
36
42
48
53MRC_API const float *MR_Sphere2f_Get_radius(const MR_Sphere2f *_this);
54
58MRC_API void MR_Sphere2f_Set_radius(MR_Sphere2f *_this, float value);
59
65
69
74
77MRC_API const MR_Sphere2f *MR_Sphere2f_OffsetPtr(const MR_Sphere2f *ptr, ptrdiff_t i);
78
82
88
93MRC_API MR_Sphere2f *MR_Sphere2f_Construct(const MR_Vector2f *c, float r);
94
96MRC_API void MR_Sphere2f_Destroy(const MR_Sphere2f *_this);
97
99MRC_API void MR_Sphere2f_DestroyArray(const MR_Sphere2f *_this);
100
108
114
120MRC_API float MR_Sphere2f_distance(const MR_Sphere2f *_this, const MR_Vector2f *x);
121
126MRC_API float MR_Sphere2f_distanceSq(const MR_Sphere2f *_this, const MR_Vector2f *x);
127
131MRC_API bool MR_equal_MR_Sphere2f(const MR_Sphere2f *a, const MR_Sphere2f *b);
132
137MRC_API const MR_Vector2d *MR_Sphere2d_Get_center(const MR_Sphere2d *_this);
138
144
150
155MRC_API const double *MR_Sphere2d_Get_radius(const MR_Sphere2d *_this);
156
160MRC_API void MR_Sphere2d_Set_radius(MR_Sphere2d *_this, double value);
161
167
171
176
179MRC_API const MR_Sphere2d *MR_Sphere2d_OffsetPtr(const MR_Sphere2d *ptr, ptrdiff_t i);
180
184
190
195MRC_API MR_Sphere2d *MR_Sphere2d_Construct(const MR_Vector2d *c, double r);
196
198MRC_API void MR_Sphere2d_Destroy(const MR_Sphere2d *_this);
199
201MRC_API void MR_Sphere2d_DestroyArray(const MR_Sphere2d *_this);
202
210
216
222MRC_API double MR_Sphere2d_distance(const MR_Sphere2d *_this, const MR_Vector2d *x);
223
228MRC_API double MR_Sphere2d_distanceSq(const MR_Sphere2d *_this, const MR_Vector2d *x);
229
233MRC_API bool MR_equal_MR_Sphere2d(const MR_Sphere2d *a, const MR_Sphere2d *b);
234
239MRC_API const MR_Vector3f *MR_Sphere3f_Get_center(const MR_Sphere3f *_this);
240
246
252
257MRC_API const float *MR_Sphere3f_Get_radius(const MR_Sphere3f *_this);
258
262MRC_API void MR_Sphere3f_Set_radius(MR_Sphere3f *_this, float value);
263
269
273
278
281MRC_API const MR_Sphere3f *MR_Sphere3f_OffsetPtr(const MR_Sphere3f *ptr, ptrdiff_t i);
282
286
292
298
300MRC_API void MR_Sphere3f_Destroy(const MR_Sphere3f *_this);
301
303MRC_API void MR_Sphere3f_DestroyArray(const MR_Sphere3f *_this);
304
312
318
324MRC_API float MR_Sphere3f_distance(const MR_Sphere3f *_this, const MR_Vector3f *x);
325
330MRC_API float MR_Sphere3f_distanceSq(const MR_Sphere3f *_this, const MR_Vector3f *x);
331
335MRC_API bool MR_equal_MR_Sphere3f(const MR_Sphere3f *a, const MR_Sphere3f *b);
336
341MRC_API const MR_Vector3d *MR_Sphere3d_Get_center(const MR_Sphere3d *_this);
342
348
354
359MRC_API const double *MR_Sphere3d_Get_radius(const MR_Sphere3d *_this);
360
364MRC_API void MR_Sphere3d_Set_radius(MR_Sphere3d *_this, double value);
365
371
375
380
383MRC_API const MR_Sphere3d *MR_Sphere3d_OffsetPtr(const MR_Sphere3d *ptr, ptrdiff_t i);
384
388
394
399MRC_API MR_Sphere3d *MR_Sphere3d_Construct(const MR_Vector3d *c, double r);
400
402MRC_API void MR_Sphere3d_Destroy(const MR_Sphere3d *_this);
403
405MRC_API void MR_Sphere3d_DestroyArray(const MR_Sphere3d *_this);
406
414
420
426MRC_API double MR_Sphere3d_distance(const MR_Sphere3d *_this, const MR_Vector3d *x);
427
432MRC_API double MR_Sphere3d_distanceSq(const MR_Sphere3d *_this, const MR_Vector3d *x);
433
437MRC_API bool MR_equal_MR_Sphere3d(const MR_Sphere3d *a, const MR_Sphere3d *b);
438
439#ifdef __cplusplus
440} // extern "C"
441#endif
struct MR_Sphere3f MR_Sphere3f
Definition MRFeatures.h:20
MRC_API double * MR_Sphere2d_GetMutable_radius(MR_Sphere2d *_this)
MRC_API MR_Sphere3f * MR_Sphere3f_OffsetMutablePtr(MR_Sphere3f *ptr, ptrdiff_t i)
MRC_API void MR_Sphere2d_Set_center(MR_Sphere2d *_this, MR_Vector2d value)
MRC_API void MR_Sphere3f_DestroyArray(const MR_Sphere3f *_this)
Destroys a heap-allocated array of MR_Sphere3f. Does nothing if the pointer is null.
MRC_API MR_Vector2f MR_Sphere2f_project(const MR_Sphere2f *_this, const MR_Vector2f *x)
MRC_API double MR_Sphere2d_distance(const MR_Sphere2d *_this, const MR_Vector2d *x)
MRC_API MR_Vector3f * MR_Sphere3f_GetMutable_center(MR_Sphere3f *_this)
MRC_API MR_Sphere3d * MR_Sphere3d_OffsetMutablePtr(MR_Sphere3d *ptr, ptrdiff_t i)
MRC_API MR_Sphere2f * MR_Sphere2f_AssignFromAnother(MR_Sphere2f *_this, const MR_Sphere2f *_other)
struct MR_Sphere2f MR_Sphere2f
Definition MRSphere.h:17
MRC_API float * MR_Sphere3f_GetMutable_radius(MR_Sphere3f *_this)
MRC_API const MR_Vector2f * MR_Sphere2f_Get_center(const MR_Sphere2f *_this)
MRC_API MR_Sphere2d * MR_Sphere2d_ConstructFromAnother(const MR_Sphere2d *_other)
MRC_API MR_Vector2d * MR_Sphere2d_GetMutable_center(MR_Sphere2d *_this)
MRC_API const double * MR_Sphere3d_Get_radius(const MR_Sphere3d *_this)
MRC_API const MR_Vector2d * MR_Sphere2d_Get_center(const MR_Sphere2d *_this)
MRC_API const MR_Sphere2d * MR_Sphere2d_OffsetPtr(const MR_Sphere2d *ptr, ptrdiff_t i)
MRC_API MR_Sphere3f * MR_Sphere3f_AssignFromAnother(MR_Sphere3f *_this, const MR_Sphere3f *_other)
MRC_API void MR_Sphere3f_Set_center(MR_Sphere3f *_this, MR_Vector3f value)
MRC_API MR_Sphere3d * MR_Sphere3d_ConstructFromAnother(const MR_Sphere3d *_other)
MRC_API void MR_Sphere2d_DestroyArray(const MR_Sphere2d *_this)
Destroys a heap-allocated array of MR_Sphere2d. Does nothing if the pointer is null.
MRC_API MR_Sphere2f * MR_Sphere2f_DefaultConstruct(void)
MRC_API float MR_Sphere2f_distance(const MR_Sphere2f *_this, const MR_Vector2f *x)
MRC_API void MR_Sphere3d_DestroyArray(const MR_Sphere3d *_this)
Destroys a heap-allocated array of MR_Sphere3d. Does nothing if the pointer is null.
MRC_API MR_Sphere3d * MR_Sphere3d_AssignFromAnother(MR_Sphere3d *_this, const MR_Sphere3d *_other)
MRC_API bool MR_equal_MR_Sphere3f(const MR_Sphere3f *a, const MR_Sphere3f *b)
MRC_API void MR_Sphere2f_DestroyArray(const MR_Sphere2f *_this)
Destroys a heap-allocated array of MR_Sphere2f. Does nothing if the pointer is null.
MRC_API void MR_Sphere3f_Destroy(const MR_Sphere3f *_this)
Destroys a heap-allocated instance of MR_Sphere3f. Does nothing if the pointer is null.
MRC_API const MR_Vector3f * MR_Sphere3f_Get_center(const MR_Sphere3f *_this)
MRC_API bool MR_equal_MR_Sphere2d(const MR_Sphere2d *a, const MR_Sphere2d *b)
MRC_API double MR_Sphere2d_distanceSq(const MR_Sphere2d *_this, const MR_Vector2d *x)
MRC_API const MR_Sphere3f * MR_Sphere3f_OffsetPtr(const MR_Sphere3f *ptr, ptrdiff_t i)
MRC_API const MR_Sphere3d * MR_Sphere3d_OffsetPtr(const MR_Sphere3d *ptr, ptrdiff_t i)
MRC_API MR_Sphere2d * MR_Sphere2d_AssignFromAnother(MR_Sphere2d *_this, const MR_Sphere2d *_other)
MRC_API MR_Sphere2f * MR_Sphere2f_OffsetMutablePtr(MR_Sphere2f *ptr, ptrdiff_t i)
MRC_API float MR_Sphere3f_distanceSq(const MR_Sphere3f *_this, const MR_Vector3f *x)
MRC_API MR_Sphere2d * MR_Sphere2d_OffsetMutablePtr(MR_Sphere2d *ptr, ptrdiff_t i)
MRC_API MR_Sphere3f * MR_Sphere3f_Construct(const MR_Vector3f *c, float r)
MRC_API MR_Sphere3d * MR_Sphere3d_Construct(const MR_Vector3d *c, double r)
MRC_API MR_Sphere2d * MR_Sphere2d_Construct(const MR_Vector2d *c, double r)
MRC_API MR_Sphere3f * MR_Sphere3f_ConstructFromAnother(const MR_Sphere3f *_other)
MRC_API double MR_Sphere3d_distance(const MR_Sphere3d *_this, const MR_Vector3d *x)
MRC_API void MR_Sphere3d_Set_center(MR_Sphere3d *_this, MR_Vector3d value)
MRC_API void MR_Sphere2f_Destroy(const MR_Sphere2f *_this)
Destroys a heap-allocated instance of MR_Sphere2f. Does nothing if the pointer is null.
MRC_API MR_Sphere2d * MR_Sphere2d_DefaultConstructArray(size_t num_elems)
MRC_API MR_Vector3d MR_Sphere3d_project(const MR_Sphere3d *_this, const MR_Vector3d *x)
MRC_API const MR_Vector3d * MR_Sphere3d_Get_center(const MR_Sphere3d *_this)
MRC_API MR_Sphere3f * MR_Sphere3f_DefaultConstructArray(size_t num_elems)
MRC_API MR_Sphere2f * MR_Sphere2f_ConstructFromAnother(const MR_Sphere2f *_other)
MRC_API MR_Vector3d * MR_Sphere3d_GetMutable_center(MR_Sphere3d *_this)
MRC_API void MR_Sphere2f_Set_center(MR_Sphere2f *_this, MR_Vector2f value)
MRC_API void MR_Sphere2f_Set_radius(MR_Sphere2f *_this, float value)
MRC_API double * MR_Sphere3d_GetMutable_radius(MR_Sphere3d *_this)
MRC_API MR_Sphere3d * MR_Sphere3d_DefaultConstruct(void)
MRC_API MR_Sphere2d * MR_Sphere2d_DefaultConstruct(void)
MRC_API float MR_Sphere2f_distanceSq(const MR_Sphere2f *_this, const MR_Vector2f *x)
MRC_API MR_Sphere3d * MR_Sphere3d_DefaultConstructArray(size_t num_elems)
MRC_API float MR_Sphere3f_distance(const MR_Sphere3f *_this, const MR_Vector3f *x)
MRC_API void MR_Sphere2d_Set_radius(MR_Sphere2d *_this, double value)
MRC_API void MR_Sphere3d_Destroy(const MR_Sphere3d *_this)
Destroys a heap-allocated instance of MR_Sphere3d. Does nothing if the pointer is null.
MRC_API MR_Vector3f MR_Sphere3f_project(const MR_Sphere3f *_this, const MR_Vector3f *x)
MRC_API double MR_Sphere3d_distanceSq(const MR_Sphere3d *_this, const MR_Vector3d *x)
struct MR_Sphere3d MR_Sphere3d
Definition MRSphere.h:29
MRC_API MR_Sphere2f * MR_Sphere2f_Construct(const MR_Vector2f *c, float r)
MRC_API MR_Vector2f * MR_Sphere2f_GetMutable_center(MR_Sphere2f *_this)
MRC_API const MR_Sphere2f * MR_Sphere2f_OffsetPtr(const MR_Sphere2f *ptr, ptrdiff_t i)
MRC_API MR_Vector2d MR_Sphere2d_project(const MR_Sphere2d *_this, const MR_Vector2d *x)
MRC_API const float * MR_Sphere3f_Get_radius(const MR_Sphere3f *_this)
MRC_API MR_Sphere2f * MR_Sphere2f_DefaultConstructArray(size_t num_elems)
MRC_API MR_Sphere3f * MR_Sphere3f_DefaultConstruct(void)
MRC_API bool MR_equal_MR_Sphere3d(const MR_Sphere3d *a, const MR_Sphere3d *b)
MRC_API void MR_Sphere2d_Destroy(const MR_Sphere2d *_this)
Destroys a heap-allocated instance of MR_Sphere2d. Does nothing if the pointer is null.
MRC_API const float * MR_Sphere2f_Get_radius(const MR_Sphere2f *_this)
MRC_API bool MR_equal_MR_Sphere2f(const MR_Sphere2f *a, const MR_Sphere2f *b)
MRC_API float * MR_Sphere2f_GetMutable_radius(MR_Sphere2f *_this)
MRC_API void MR_Sphere3f_Set_radius(MR_Sphere3f *_this, float value)
struct MR_Sphere2d MR_Sphere2d
Definition MRSphere.h:21
MRC_API const double * MR_Sphere2d_Get_radius(const MR_Sphere2d *_this)
MRC_API void MR_Sphere3d_Set_radius(MR_Sphere3d *_this, double value)
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