MeshLib C Docs
Loading...
Searching...
No Matches
MRVector4.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRVector3.h>
4#include <MRCMisc/common.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
15typedef struct MR_NoInit MR_NoInit; // Defined in `#include <MRCMesh/MRMeshFwd.h>`.
16
17
20typedef struct MR_Vector4b
21{
22 bool x;
23 bool y;
24 bool z;
25 bool w;
27
30typedef struct MR_Vector4i
31{
32 int32_t x;
33 int32_t y;
34 int32_t z;
35 int32_t w;
37
47
50typedef struct MR_Vector4f
51{
52 float x;
53 float y;
54 float z;
55 float w;
57
60typedef struct MR_Vector4d
61{
62 double x;
63 double y;
64 double z;
65 double w;
67
70MRC_API const int32_t *MR_Vector4b_Get_elements(void);
71
74
79
83
85MRC_API MR_Vector4b MR_Vector4b_Construct_4(bool x, bool y, bool z, bool w);
86
89
93MRC_API const bool *MR_Vector4b_index_const(const MR_Vector4b *_this, int32_t e);
94
98MRC_API bool *MR_Vector4b_index(MR_Vector4b *_this, int32_t e);
99
103
107
112
117
118// NOTE: We use `std::declval()` in the operators below because libclang 18 in our binding generator is bugged and chokes on decltyping `a.x` and such. TODO fix this when we update libclang.
123
127
132
137
141
145
148
154
160
165
170
174
177
182
186
188MRC_API MR_Vector4i MR_Vector4i_Construct_4(int32_t x, int32_t y, int32_t z, int32_t w);
189
192
196MRC_API const int32_t *MR_Vector4i_index_const(const MR_Vector4i *_this, int32_t e);
197
201MRC_API int32_t *MR_Vector4i_index(MR_Vector4i *_this, int32_t e);
202
206
210
215
220
221// NOTE: We use `std::declval()` in the operators below because libclang 18 in our binding generator is bugged and chokes on decltyping `a.x` and such. TODO fix this when we update libclang.
226
230
235
240
244
248
251
257
263
268
273
277
280
285
289
292
295
300
305
309
313
318
323
324// NOTE: We use `std::declval()` in the operators below because libclang 18 in our binding generator is bugged and chokes on decltyping `a.x` and such. TODO fix this when we update libclang.
329
333
338
343
347
351
354
360
366
371
376
380
383
388
392
394MRC_API MR_Vector4f MR_Vector4f_Construct_4(float x, float y, float z, float w);
395
398
402MRC_API const float *MR_Vector4f_index_const(const MR_Vector4f *_this, int32_t e);
403
407MRC_API float *MR_Vector4f_index(MR_Vector4f *_this, int32_t e);
408
412
416
420
425
429
434
439
440// NOTE: We use `std::declval()` in the operators below because libclang 18 in our binding generator is bugged and chokes on decltyping `a.x` and such. TODO fix this when we update libclang.
445
449
454
459
463
467
470
476
482
487
492
496
499
504
508
510MRC_API MR_Vector4d MR_Vector4d_Construct_4(double x, double y, double z, double w);
511
514
518MRC_API const double *MR_Vector4d_index_const(const MR_Vector4d *_this, int32_t e);
519
523MRC_API double *MR_Vector4d_index(MR_Vector4d *_this, int32_t e);
524
528
532
536
541
545
550
555
556// NOTE: We use `std::declval()` in the operators below because libclang 18 in our binding generator is bugged and chokes on decltyping `a.x` and such. TODO fix this when we update libclang.
561
565
570
575
579
583
586
592
598
603
608
614
620
626
632
638
639#ifdef __cplusplus
640} // extern "C"
641#endif
struct MR_NoInit MR_NoInit
Definition MRBox.h:16
struct MR_Vector4i64 MR_Vector4i64
MRC_API MR_Vector4i64 MR_sub_MR_Vector4i64(const MR_Vector4i64 *a, const MR_Vector4i64 *b)
MRC_API int32_t * MR_Vector4i_index(MR_Vector4i *_this, int32_t e)
MRC_API const float * MR_Vector4f_index_const(const MR_Vector4f *_this, int32_t e)
MRC_API MR_Vector4i64 * MR_mul_assign_MR_Vector4i64_int64_t(MR_Vector4i64 *a, MR_int64_t b)
MRC_API MR_Vector4i * MR_sub_assign_MR_Vector4i(MR_Vector4i *a, const MR_Vector4i *b)
MRC_API const MR_int64_t * MR_Vector4i64_index_const(const MR_Vector4i64 *_this, int32_t e)
struct MR_Vector4d MR_Vector4d
MRC_API MR_Vector4d * MR_sub_assign_MR_Vector4d(MR_Vector4d *a, const MR_Vector4d *b)
MRC_API MR_Vector3f MR_Vector4f_proj3d(const MR_Vector4f *_this)
MRC_API MR_Vector4f MR_mul_float_MR_Vector4f(float a, const MR_Vector4f *b)
MRC_API const int32_t * MR_Vector4f_Get_elements(void)
MRC_API MR_Vector4d * MR_div_assign_MR_Vector4d_double(MR_Vector4d *a, double b)
MRC_API float MR_Vector4f_length(const MR_Vector4f *_this)
MRC_API MR_Vector4f MR_Vector4f_Construct_1(const MR_NoInit *_1)
MRC_API MR_Vector4i MR_sub_MR_Vector4b(const MR_Vector4b *a, const MR_Vector4b *b)
MRC_API MR_int64_t MR_Vector4i64_lengthSq(const MR_Vector4i64 *_this)
MRC_API bool MR_not_equal_MR_Vector4i64(const MR_Vector4i64 *a, const MR_Vector4i64 *b)
MRC_API const double * MR_Vector4d_index_const(const MR_Vector4d *_this, int32_t e)
MRC_API MR_Vector4d MR_add_MR_Vector4d(const MR_Vector4d *a, const MR_Vector4d *b)
MRC_API MR_Vector4b * MR_div_assign_MR_Vector4b_bool(MR_Vector4b *a, bool b)
MRC_API const int32_t * MR_Vector4i_Get_elements(void)
MRC_API const int32_t * MR_Vector4b_Get_elements(void)
MRC_API MR_Vector4d MR_Vector4d_Construct_4(double x, double y, double z, double w)
Generated from a constructor of class MR::Vector4d.
MRC_API bool MR_Vector4d_isFinite(const MR_Vector4d *_this)
struct MR_Vector4f MR_Vector4f
MRC_API MR_Vector4i MR_div_MR_Vector4b_bool(MR_Vector4b b, bool a)
Generated from function MR::operator/.
MRC_API MR_Vector4i64 * MR_add_assign_MR_Vector4i64(MR_Vector4i64 *a, const MR_Vector4i64 *b)
MRC_API MR_Vector4f MR_mul_MR_Vector4f_float(const MR_Vector4f *b, float a)
MRC_API MR_Vector4i MR_Vector4i_diagonal(int32_t a)
Generated from a method of class MR::Vector4i named diagonal.
MRC_API const MR_Vector4b * MR_pos_MR_Vector4b(const MR_Vector4b *a)
MRC_API MR_Vector4i64 MR_neg_MR_Vector4i64(const MR_Vector4i64 *a)
MRC_API double MR_dot_double_MR_Vector4d(const MR_Vector4d *a, const MR_Vector4d *b)
MRC_API MR_Vector4i * MR_add_assign_MR_Vector4i(MR_Vector4i *a, const MR_Vector4i *b)
MRC_API double * MR_Vector4d_index(MR_Vector4d *_this, int32_t e)
MRC_API MR_Vector4i64 MR_mul_MR_Vector4i64_int64_t(const MR_Vector4i64 *b, MR_int64_t a)
MRC_API MR_int64_t MR_dot_int64_t_MR_Vector4i64(const MR_Vector4i64 *a, const MR_Vector4i64 *b)
MRC_API bool MR_equal_MR_Vector4i(const MR_Vector4i *a, const MR_Vector4i *b)
MRC_API const MR_Vector4f * MR_pos_MR_Vector4f(const MR_Vector4f *a)
MRC_API MR_Vector4d * MR_add_assign_MR_Vector4d(MR_Vector4d *a, const MR_Vector4d *b)
MRC_API double MR_Vector4i_length(const MR_Vector4i *_this)
MRC_API double MR_Vector4i64_length(const MR_Vector4i64 *_this)
MRC_API bool MR_equal_MR_Vector4f(const MR_Vector4f *a, const MR_Vector4f *b)
MRC_API MR_Vector4i MR_Vector4i_Construct_1(const MR_NoInit *_1)
MRC_API MR_Vector4i MR_div_MR_Vector4i_int32_t(MR_Vector4i b, int32_t a)
Generated from function MR::operator/.
MRC_API bool * MR_Vector4b_index(MR_Vector4b *_this, int32_t e)
MRC_API MR_Vector4d MR_Vector4d_diagonal(double a)
Generated from a method of class MR::Vector4d named diagonal.
MRC_API const int32_t * MR_Vector4d_Get_elements(void)
MRC_API bool MR_equal_MR_Vector4i64(const MR_Vector4i64 *a, const MR_Vector4i64 *b)
MRC_API const bool * MR_Vector4b_index_const(const MR_Vector4b *_this, int32_t e)
MRC_API MR_Vector4i64 MR_mul_int64_t_MR_Vector4i64(MR_int64_t a, const MR_Vector4i64 *b)
MRC_API MR_Vector4f MR_Vector4f_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API MR_Vector4i MR_mul_bool_MR_Vector4b(bool a, const MR_Vector4b *b)
MRC_API float MR_Vector4f_lengthSq(const MR_Vector4f *_this)
MRC_API MR_Vector4i * MR_div_assign_MR_Vector4i_int32_t(MR_Vector4i *a, int32_t b)
MRC_API MR_Vector4i MR_Vector4i_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API MR_int64_t * MR_Vector4i64_index(MR_Vector4i64 *_this, int32_t e)
MRC_API MR_Vector4d MR_div_MR_Vector4d_double(MR_Vector4d b, double a)
Generated from function MR::operator/.
MRC_API const MR_Vector4i * MR_pos_MR_Vector4i(const MR_Vector4i *a)
MRC_API bool MR_Vector4f_isFinite(const MR_Vector4f *_this)
MRC_API MR_Vector4f MR_neg_MR_Vector4f(const MR_Vector4f *a)
MRC_API MR_Vector4d MR_neg_MR_Vector4d(const MR_Vector4d *a)
MRC_API MR_Vector4f * MR_div_assign_MR_Vector4f_float(MR_Vector4f *a, float b)
MRC_API MR_Vector4d MR_sub_MR_Vector4d(const MR_Vector4d *a, const MR_Vector4d *b)
MRC_API bool MR_equal_MR_Vector4b(const MR_Vector4b *a, const MR_Vector4b *b)
MRC_API MR_Vector4d MR_mul_MR_Vector4d_double(const MR_Vector4d *b, double a)
MRC_API MR_Vector4b * MR_mul_assign_MR_Vector4b_bool(MR_Vector4b *a, bool b)
MRC_API MR_Vector4i MR_neg_MR_Vector4i(const MR_Vector4i *a)
struct MR_Vector4b MR_Vector4b
MRC_API MR_Vector4i * MR_mul_assign_MR_Vector4i_int32_t(MR_Vector4i *a, int32_t b)
MRC_API bool MR_not_equal_MR_Vector4b(const MR_Vector4b *a, const MR_Vector4b *b)
MRC_API MR_Vector4f MR_Vector4f_diagonal(float a)
Generated from a method of class MR::Vector4f named diagonal.
MRC_API double MR_Vector4b_length(const MR_Vector4b *_this)
MRC_API const MR_Vector4i64 * MR_pos_MR_Vector4i64(const MR_Vector4i64 *a)
MRC_API MR_Vector3d MR_Vector4d_proj3d(const MR_Vector4d *_this)
MRC_API MR_Vector4d MR_mul_double_MR_Vector4d(double a, const MR_Vector4d *b)
MRC_API double MR_Vector4d_length(const MR_Vector4d *_this)
MRC_API MR_Vector4i MR_add_MR_Vector4b(const MR_Vector4b *a, const MR_Vector4b *b)
MRC_API MR_Vector4i64 MR_Vector4i64_diagonal(MR_int64_t a)
Generated from a method of class MR::Vector4i64 named diagonal.
MRC_API MR_Vector4f MR_add_MR_Vector4f(const MR_Vector4f *a, const MR_Vector4f *b)
MRC_API MR_Vector4d MR_Vector4d_normalized(const MR_Vector4d *_this)
MRC_API MR_Vector4i64 MR_Vector4i64_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API bool MR_Vector4b_lengthSq(const MR_Vector4b *_this)
MRC_API const MR_Vector4d * MR_pos_MR_Vector4d(const MR_Vector4d *a)
MRC_API int32_t MR_dot_bool_MR_Vector4b(const MR_Vector4b *a, const MR_Vector4b *b)
MRC_API MR_Vector4f MR_Vector4f_normalized(const MR_Vector4f *_this)
MRC_API double MR_Vector4d_lengthSq(const MR_Vector4d *_this)
MRC_API float * MR_Vector4f_index(MR_Vector4f *_this, int32_t e)
struct MR_Vector4i MR_Vector4i
MRC_API MR_Vector4i MR_neg_MR_Vector4b(const MR_Vector4b *a)
MRC_API bool MR_not_equal_MR_Vector4d(const MR_Vector4d *a, const MR_Vector4d *b)
MRC_API int32_t MR_Vector4i_lengthSq(const MR_Vector4i *_this)
MRC_API MR_Vector4i MR_mul_int32_t_MR_Vector4i(int32_t a, const MR_Vector4i *b)
MRC_API MR_Vector4i64 MR_Vector4i64_Construct_4(MR_int64_t x, MR_int64_t y, MR_int64_t z, MR_int64_t w)
Generated from a constructor of class MR::Vector4i64.
MRC_API MR_Vector4i MR_Vector4i_Construct_4(int32_t x, int32_t y, int32_t z, int32_t w)
Generated from a constructor of class MR::Vector4i.
MRC_API bool MR_equal_MR_Vector4d(const MR_Vector4d *a, const MR_Vector4d *b)
MRC_API MR_Vector4f MR_div_MR_Vector4f_float(MR_Vector4f b, float a)
Generated from function MR::operator/.
MRC_API MR_Vector4i64 MR_add_MR_Vector4i64(const MR_Vector4i64 *a, const MR_Vector4i64 *b)
MRC_API MR_Vector4f * MR_Vector4f_DefaultConstructArray(size_t num_elems)
MRC_API MR_Vector4i64 * MR_div_assign_MR_Vector4i64_int64_t(MR_Vector4i64 *a, MR_int64_t b)
MRC_API MR_Vector4b MR_Vector4b_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API MR_Vector4d * MR_Vector4d_DefaultConstructArray(size_t num_elems)
MRC_API MR_Vector4f MR_sub_MR_Vector4f(const MR_Vector4f *a, const MR_Vector4f *b)
MRC_API MR_Vector4b MR_Vector4b_Construct_4(bool x, bool y, bool z, bool w)
Generated from a constructor of class MR::Vector4b.
MRC_API MR_Vector4f * MR_mul_assign_MR_Vector4f_float(MR_Vector4f *a, float b)
MRC_API MR_Vector4f * MR_add_assign_MR_Vector4f(MR_Vector4f *a, const MR_Vector4f *b)
MRC_API bool MR_not_equal_MR_Vector4i(const MR_Vector4i *a, const MR_Vector4i *b)
MRC_API MR_Vector4i64 * MR_sub_assign_MR_Vector4i64(MR_Vector4i64 *a, const MR_Vector4i64 *b)
MRC_API MR_Vector4i64 * MR_Vector4i64_DefaultConstructArray(size_t num_elems)
MRC_API MR_Vector4i MR_mul_MR_Vector4i_int32_t(const MR_Vector4i *b, int32_t a)
MRC_API float MR_dot_float_MR_Vector4f(const MR_Vector4f *a, const MR_Vector4f *b)
MRC_API MR_Vector4i * MR_Vector4i_DefaultConstructArray(size_t num_elems)
MRC_API MR_Vector4i64 MR_div_MR_Vector4i64_int64_t(MR_Vector4i64 b, MR_int64_t a)
Generated from function MR::operator/.
MRC_API bool MR_not_equal_MR_Vector4f(const MR_Vector4f *a, const MR_Vector4f *b)
MRC_API MR_Vector4i MR_sub_MR_Vector4i(const MR_Vector4i *a, const MR_Vector4i *b)
MRC_API MR_Vector4d MR_Vector4d_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API MR_Vector4b MR_Vector4b_diagonal(bool a)
Generated from a method of class MR::Vector4b named diagonal.
MRC_API MR_Vector4i64 MR_Vector4i64_Construct_1(const MR_NoInit *_1)
MRC_API const int32_t * MR_Vector4i_index_const(const MR_Vector4i *_this, int32_t e)
MRC_API MR_Vector4b MR_Vector4b_Construct_1(const MR_NoInit *_1)
MRC_API MR_Vector4b * MR_add_assign_MR_Vector4b(MR_Vector4b *a, const MR_Vector4b *b)
MRC_API MR_Vector4i MR_mul_MR_Vector4b_bool(const MR_Vector4b *b, bool a)
MRC_API const int32_t * MR_Vector4i64_Get_elements(void)
MRC_API MR_Vector4d * MR_mul_assign_MR_Vector4d_double(MR_Vector4d *a, double b)
MRC_API MR_Vector4f * MR_sub_assign_MR_Vector4f(MR_Vector4f *a, const MR_Vector4f *b)
MRC_API MR_Vector4d MR_Vector4d_Construct_1(const MR_NoInit *_1)
MRC_API int32_t MR_dot_int32_t_MR_Vector4i(const MR_Vector4i *a, const MR_Vector4i *b)
MRC_API MR_Vector4b * MR_Vector4b_DefaultConstructArray(size_t num_elems)
MRC_API MR_Vector4i MR_add_MR_Vector4i(const MR_Vector4i *a, const MR_Vector4i *b)
MRC_API MR_Vector4b * MR_sub_assign_MR_Vector4b(MR_Vector4b *a, const MR_Vector4b *b)
MRC_API MR_Vector4f MR_Vector4f_Construct_4(float x, float y, float z, float w)
Generated from a constructor of class MR::Vector4f.
int64_t MR_int64_t
Definition common.h:13
#define MRC_API
Definition exports.h:11
Definition MRVector3.h:60
Definition MRVector3.h:51
Definition MRVector4.h:21
bool y
Definition MRVector4.h:23
bool z
Definition MRVector4.h:24
bool w
Definition MRVector4.h:25
bool x
Definition MRVector4.h:22
Definition MRVector4.h:61
double x
Definition MRVector4.h:62
double z
Definition MRVector4.h:64
double y
Definition MRVector4.h:63
double w
Definition MRVector4.h:65
Definition MRVector4.h:51
float y
Definition MRVector4.h:53
float z
Definition MRVector4.h:54
float x
Definition MRVector4.h:52
float w
Definition MRVector4.h:55
Definition MRVector4.h:41
MR_int64_t x
Definition MRVector4.h:42
MR_int64_t z
Definition MRVector4.h:44
MR_int64_t w
Definition MRVector4.h:45
MR_int64_t y
Definition MRVector4.h:43
Definition MRVector4.h:31
int32_t x
Definition MRVector4.h:32
int32_t y
Definition MRVector4.h:33
int32_t z
Definition MRVector4.h:34
int32_t w
Definition MRVector4.h:35