MeshLib C Docs
Loading...
Searching...
No Matches
MRMatrix2.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRVector2.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
15
24
33
42
51
60
63
68
74
77
80
84
88
92
98
105
110MRC_API const MR_Vector2b *MR_Matrix2b_index_const(const MR_Matrix2b *_this, int32_t row);
111
116
121
126
131
135
140
145
150
155
156// 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.
161
166
170
174
177
183
189
194
199
205
211
214
219
225
228
231
235
239
243
249
256
261MRC_API const MR_Vector2i *MR_Matrix2i_index_const(const MR_Matrix2i *_this, int32_t row);
262
267
272
277
282
286
290MRC_API int32_t MR_Matrix2i_det(const MR_Matrix2i *_this);
291
296
301
306
307// 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.
312
317
321
325
328
334
340
345
350
356
362
365
370
376
379
382
386
390
394
400
407
413
418
423
428
433
437
442
447
452
457
458// 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.
463
468
472
476
479
485
491
496
501
507
513
516
521
527
530
533
537
541
545
549
555
561
568
573MRC_API const MR_Vector2f *MR_Matrix2f_index_const(const MR_Matrix2f *_this, int32_t row);
574
579
584
589
594
598
603
608
613
618
623
624// 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.
629
634
638
642
645
651
657
662
667
673
679
682
687
693
696
699
703
707
711
715
721
727
734
739MRC_API const MR_Vector2d *MR_Matrix2d_index_const(const MR_Matrix2d *_this, int32_t row);
740
745
750
755
760
764
769
774
779
784
789
790// 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.
795
800
804
808
811
817
823
828
833
839
845
846#ifdef __cplusplus
847} // extern "C"
848#endif
MRC_API bool MR_equal_MR_Matrix2i64(const MR_Matrix2i64 *a, const MR_Matrix2i64 *b)
MRC_API MR_Vector2f * MR_Matrix2f_index(MR_Matrix2f *_this, int32_t row)
MRC_API float MR_Matrix2f_det(const MR_Matrix2f *_this)
MRC_API MR_Matrix2i64 MR_mul_MR_Matrix2i64_int64_t(const MR_Matrix2i64 *b, MR_int64_t a)
MRC_API MR_Matrix2f MR_Matrix2f_fromRows(const MR_Vector2f *x, const MR_Vector2f *y)
MRC_API MR_Matrix2i64 MR_sub_MR_Matrix2i64(const MR_Matrix2i64 *a, const MR_Matrix2i64 *b)
MRC_API MR_Vector2i MR_mul_MR_Matrix2i_MR_Vector2i(const MR_Matrix2i *a, const MR_Vector2i *b)
MRC_API MR_Matrix2f MR_Matrix2f_transposed(const MR_Matrix2f *_this)
MRC_API MR_Matrix2i MR_Matrix2i_Construct(const MR_Vector2i *x, const MR_Vector2i *y)
MRC_API MR_Matrix2f * MR_sub_assign_MR_Matrix2f(MR_Matrix2f *a, const MR_Matrix2f *b)
MRC_API MR_Matrix2i MR_Matrix2i_transposed(const MR_Matrix2i *_this)
MRC_API MR_Matrix2i64 MR_Matrix2i64_scale_1_int64_t(MR_int64_t s)
MRC_API MR_Matrix2i64 MR_mul_int64_t_MR_Matrix2i64(MR_int64_t a, const MR_Matrix2i64 *b)
MRC_API MR_Matrix2i64 MR_Matrix2i64_Construct(const MR_Vector2i64 *x, const MR_Vector2i64 *y)
MRC_API bool MR_equal_MR_Matrix2d(const MR_Matrix2d *a, const MR_Matrix2d *b)
MRC_API MR_Vector2i64 MR_mul_MR_Matrix2i64_MR_Vector2i64(const MR_Matrix2i64 *a, const MR_Vector2i64 *b)
MRC_API MR_Matrix2f * MR_add_assign_MR_Matrix2f(MR_Matrix2f *a, const MR_Matrix2f *b)
MRC_API MR_Matrix2f MR_Matrix2f_identity(void)
Generated from a method of class MR::Matrix2f named identity.
MRC_API MR_int64_t MR_Matrix2i64_trace(const MR_Matrix2i64 *_this)
MRC_API bool MR_Matrix2b_trace(const MR_Matrix2b *_this)
MRC_API MR_Matrix2i MR_mul_MR_Matrix2b(const MR_Matrix2b *a, const MR_Matrix2b *b)
MRC_API MR_Matrix2i64 MR_div_MR_Matrix2i64_int64_t(MR_Matrix2i64 b, MR_int64_t a)
Generated from function MR::operator/.
MRC_API MR_Matrix2i64 * MR_div_assign_MR_Matrix2i64_int64_t(MR_Matrix2i64 *a, MR_int64_t b)
MRC_API MR_Matrix2i MR_mul_int32_t_MR_Matrix2i(int32_t a, const MR_Matrix2i *b)
MRC_API MR_Matrix2i64 MR_Matrix2i64_scale_1_MR_Vector2i64(const MR_Vector2i64 *s)
MRC_API MR_Matrix2f * MR_Matrix2f_DefaultConstructArray(size_t num_elems)
MRC_API MR_Matrix2d MR_mul_MR_Matrix2d(const MR_Matrix2d *a, const MR_Matrix2d *b)
MRC_API bool MR_not_equal_MR_Matrix2i(const MR_Matrix2i *a, const MR_Matrix2i *b)
MRC_API int32_t MR_Matrix2i_det(const MR_Matrix2i *_this)
MRC_API MR_Vector2d MR_Matrix2d_col(const MR_Matrix2d *_this, int32_t i)
MRC_API MR_Matrix2d MR_Matrix2d_fromRows(const MR_Vector2d *x, const MR_Vector2d *y)
MRC_API MR_Matrix2i MR_div_MR_Matrix2b_bool(MR_Matrix2b b, bool a)
Generated from function MR::operator/.
MRC_API MR_Matrix2f MR_Matrix2f_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API MR_Matrix2i64 MR_Matrix2i64_fromRows(const MR_Vector2i64 *x, const MR_Vector2i64 *y)
MRC_API MR_Matrix2i MR_Matrix2i_scale_1_int32_t(int32_t s)
MRC_API MR_Matrix2i MR_mul_MR_Matrix2b_bool(const MR_Matrix2b *b, bool a)
MRC_API MR_Matrix2d MR_Matrix2d_fromColumns(const MR_Vector2d *x, const MR_Vector2d *y)
MRC_API MR_Vector2i64 MR_Matrix2i64_col(const MR_Matrix2i64 *_this, int32_t i)
MRC_API MR_Matrix2i MR_sub_MR_Matrix2i(const MR_Matrix2i *a, const MR_Matrix2i *b)
MRC_API double MR_Matrix2d_normSq(const MR_Matrix2d *_this)
MRC_API bool MR_Matrix2b_det(const MR_Matrix2b *_this)
MRC_API MR_Matrix2f MR_Matrix2f_Construct(const MR_Vector2f *x, const MR_Vector2f *y)
MRC_API MR_Matrix2f MR_Matrix2f_scale_2(float sx, float sy)
MRC_API MR_Matrix2i64 MR_Matrix2i64_identity(void)
Generated from a method of class MR::Matrix2i64 named identity.
MRC_API MR_Matrix2f MR_Matrix2f_scale_1_float(float s)
MRC_API MR_Matrix2b MR_Matrix2b_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API MR_Matrix2b * MR_sub_assign_MR_Matrix2b(MR_Matrix2b *a, const MR_Matrix2b *b)
MRC_API MR_Matrix2f MR_Matrix2f_fromColumns(const MR_Vector2f *x, const MR_Vector2f *y)
struct MR_Matrix2i64 MR_Matrix2i64
MRC_API MR_Matrix2b MR_Matrix2b_transposed(const MR_Matrix2b *_this)
MRC_API MR_Matrix2i64 MR_Matrix2i64_zero(void)
Generated from a method of class MR::Matrix2i64 named zero.
MRC_API double MR_Matrix2b_norm(const MR_Matrix2b *_this)
MRC_API MR_Matrix2d MR_Matrix2d_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API const MR_Vector2d * MR_Matrix2d_index_const(const MR_Matrix2d *_this, int32_t row)
MRC_API MR_Matrix2d MR_Matrix2d_rotation_2(const MR_Vector2d *from, const MR_Vector2d *to)
MRC_API MR_Matrix2f MR_Matrix2f_zero(void)
Generated from a method of class MR::Matrix2f named zero.
MRC_API bool MR_not_equal_MR_Matrix2d(const MR_Matrix2d *a, const MR_Matrix2d *b)
MRC_API double MR_Matrix2i64_norm(const MR_Matrix2i64 *_this)
MRC_API MR_Matrix2d * MR_div_assign_MR_Matrix2d_double(MR_Matrix2d *a, double b)
MRC_API MR_Matrix2i * MR_add_assign_MR_Matrix2i(MR_Matrix2i *a, const MR_Matrix2i *b)
MRC_API bool MR_equal_MR_Matrix2i(const MR_Matrix2i *a, const MR_Matrix2i *b)
MRC_API MR_Matrix2b * MR_Matrix2b_DefaultConstructArray(size_t num_elems)
MRC_API bool MR_not_equal_MR_Matrix2f(const MR_Matrix2f *a, const MR_Matrix2f *b)
MRC_API MR_Matrix2i64 MR_Matrix2i64_fromColumns(const MR_Vector2i64 *x, const MR_Vector2i64 *y)
MRC_API MR_Matrix2i MR_add_MR_Matrix2b(const MR_Matrix2b *a, const MR_Matrix2b *b)
MRC_API MR_Matrix2f MR_div_MR_Matrix2f_float(MR_Matrix2f b, float a)
Generated from function MR::operator/.
MRC_API MR_Matrix2i MR_Matrix2i_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API MR_Matrix2d MR_Matrix2d_rotation_1(double angle)
MRC_API MR_Matrix2d MR_Matrix2d_zero(void)
Generated from a method of class MR::Matrix2d named zero.
MRC_API MR_Matrix2b MR_Matrix2b_Construct(const MR_Vector2b *x, const MR_Vector2b *y)
MRC_API MR_Matrix2i MR_Matrix2i_identity(void)
Generated from a method of class MR::Matrix2i named identity.
MRC_API MR_Matrix2i MR_mul_bool_MR_Matrix2b(bool a, const MR_Matrix2b *b)
MRC_API MR_Vector2f MR_Matrix2f_col(const MR_Matrix2f *_this, int32_t i)
MRC_API const MR_Vector2f * MR_Matrix2f_index_const(const MR_Matrix2f *_this, int32_t row)
MRC_API bool MR_equal_MR_Matrix2b(const MR_Matrix2b *a, const MR_Matrix2b *b)
MRC_API MR_Vector2i64 * MR_Matrix2i64_index(MR_Matrix2i64 *_this, int32_t row)
MRC_API MR_Matrix2i64 MR_Matrix2i64_transposed(const MR_Matrix2i64 *_this)
MRC_API MR_Matrix2i64 * MR_mul_assign_MR_Matrix2i64_int64_t(MR_Matrix2i64 *a, MR_int64_t b)
MRC_API MR_Matrix2d MR_Matrix2d_scale_1_MR_Vector2d(const MR_Vector2d *s)
MRC_API MR_Matrix2d MR_Matrix2d_scale_2(double sx, double sy)
MRC_API MR_Matrix2b MR_Matrix2b_scale_1_bool(bool s)
MRC_API MR_Matrix2d MR_Matrix2d_identity(void)
Generated from a method of class MR::Matrix2d named identity.
struct MR_Matrix2d MR_Matrix2d
MRC_API MR_Matrix2b * MR_div_assign_MR_Matrix2b_bool(MR_Matrix2b *a, bool b)
MRC_API MR_Matrix2b MR_Matrix2b_fromRows(const MR_Vector2b *x, const MR_Vector2b *y)
MRC_API double MR_Matrix2d_norm(const MR_Matrix2d *_this)
MRC_API MR_Matrix2i * MR_div_assign_MR_Matrix2i_int32_t(MR_Matrix2i *a, int32_t b)
MRC_API MR_Matrix2i MR_Matrix2i_zero(void)
Generated from a method of class MR::Matrix2i named zero.
MRC_API MR_Matrix2i64 MR_Matrix2i64_scale_2(MR_int64_t sx, MR_int64_t sy)
MRC_API MR_Vector2b MR_Matrix2b_col(const MR_Matrix2b *_this, int32_t i)
struct MR_Matrix2i MR_Matrix2i
MRC_API MR_Matrix2i * MR_Matrix2i_DefaultConstructArray(size_t num_elems)
MRC_API MR_Vector2d MR_mul_MR_Matrix2d_MR_Vector2d(const MR_Matrix2d *a, const MR_Vector2d *b)
MRC_API bool MR_not_equal_MR_Matrix2i64(const MR_Matrix2i64 *a, const MR_Matrix2i64 *b)
MRC_API float MR_Matrix2f_normSq(const MR_Matrix2f *_this)
MRC_API MR_Vector2b * MR_Matrix2b_index(MR_Matrix2b *_this, int32_t row)
MRC_API MR_Matrix2i MR_Matrix2i_fromColumns(const MR_Vector2i *x, const MR_Vector2i *y)
MRC_API MR_Matrix2d * MR_add_assign_MR_Matrix2d(MR_Matrix2d *a, const MR_Matrix2d *b)
MRC_API MR_Matrix2d MR_mul_double_MR_Matrix2d(double a, const MR_Matrix2d *b)
MRC_API MR_Matrix2i * MR_mul_assign_MR_Matrix2i_int32_t(MR_Matrix2i *a, int32_t b)
MRC_API double MR_Matrix2d_det(const MR_Matrix2d *_this)
MRC_API MR_Matrix2i64 MR_Matrix2i64_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API MR_int64_t MR_Matrix2i64_normSq(const MR_Matrix2i64 *_this)
MRC_API MR_Matrix2i64 MR_add_MR_Matrix2i64(const MR_Matrix2i64 *a, const MR_Matrix2i64 *b)
MRC_API bool MR_Matrix2b_normSq(const MR_Matrix2b *_this)
MRC_API MR_Vector2d * MR_Matrix2d_index(MR_Matrix2d *_this, int32_t row)
MRC_API MR_Matrix2i MR_mul_MR_Matrix2i(const MR_Matrix2i *a, const MR_Matrix2i *b)
MRC_API MR_Matrix2i MR_div_MR_Matrix2i_int32_t(MR_Matrix2i b, int32_t a)
Generated from function MR::operator/.
struct MR_Matrix2f MR_Matrix2f
MRC_API MR_int64_t MR_Matrix2i64_det(const MR_Matrix2i64 *_this)
MRC_API bool MR_not_equal_MR_Matrix2b(const MR_Matrix2b *a, const MR_Matrix2b *b)
MRC_API MR_Matrix2d MR_sub_MR_Matrix2d(const MR_Matrix2d *a, const MR_Matrix2d *b)
MRC_API MR_Matrix2i MR_sub_MR_Matrix2b(const MR_Matrix2b *a, const MR_Matrix2b *b)
MRC_API MR_Vector2i MR_mul_MR_Matrix2b_MR_Vector2b(const MR_Matrix2b *a, const MR_Vector2b *b)
MRC_API MR_Vector2f MR_mul_MR_Matrix2f_MR_Vector2f(const MR_Matrix2f *a, const MR_Vector2f *b)
MRC_API MR_Matrix2f MR_mul_MR_Matrix2f_float(const MR_Matrix2f *b, float a)
MRC_API float MR_Matrix2f_trace(const MR_Matrix2f *_this)
MRC_API MR_Matrix2i64 * MR_add_assign_MR_Matrix2i64(MR_Matrix2i64 *a, const MR_Matrix2i64 *b)
MRC_API MR_Matrix2b * MR_add_assign_MR_Matrix2b(MR_Matrix2b *a, const MR_Matrix2b *b)
MRC_API int32_t MR_Matrix2i_trace(const MR_Matrix2i *_this)
MRC_API MR_Matrix2d MR_mul_MR_Matrix2d_double(const MR_Matrix2d *b, double a)
MRC_API MR_Matrix2f MR_Matrix2f_scale_1_MR_Vector2f(const MR_Vector2f *s)
MRC_API MR_Matrix2i MR_mul_MR_Matrix2i_int32_t(const MR_Matrix2i *b, int32_t a)
MRC_API MR_Vector2i * MR_Matrix2i_index(MR_Matrix2i *_this, int32_t row)
MRC_API MR_Matrix2i64 MR_mul_MR_Matrix2i64(const MR_Matrix2i64 *a, const MR_Matrix2i64 *b)
MRC_API MR_Matrix2d MR_Matrix2d_inverse(const MR_Matrix2d *_this)
MRC_API float MR_Matrix2f_norm(const MR_Matrix2f *_this)
MRC_API bool MR_equal_MR_Matrix2f(const MR_Matrix2f *a, const MR_Matrix2f *b)
MRC_API MR_Matrix2i64 * MR_sub_assign_MR_Matrix2i64(MR_Matrix2i64 *a, const MR_Matrix2i64 *b)
MRC_API MR_Matrix2f MR_mul_MR_Matrix2f(const MR_Matrix2f *a, const MR_Matrix2f *b)
MRC_API MR_Matrix2d MR_Matrix2d_scale_1_double(double s)
MRC_API MR_Matrix2f * MR_div_assign_MR_Matrix2f_float(MR_Matrix2f *a, float b)
MRC_API double MR_Matrix2i_norm(const MR_Matrix2i *_this)
MRC_API MR_Matrix2b * MR_mul_assign_MR_Matrix2b_bool(MR_Matrix2b *a, bool b)
MRC_API MR_Matrix2d * MR_mul_assign_MR_Matrix2d_double(MR_Matrix2d *a, double b)
MRC_API MR_Matrix2d MR_add_MR_Matrix2d(const MR_Matrix2d *a, const MR_Matrix2d *b)
MRC_API MR_Matrix2b MR_Matrix2b_zero(void)
Generated from a method of class MR::Matrix2b named zero.
MRC_API MR_Matrix2i MR_Matrix2i_fromRows(const MR_Vector2i *x, const MR_Vector2i *y)
MRC_API MR_Matrix2i64 * MR_Matrix2i64_DefaultConstructArray(size_t num_elems)
MRC_API int32_t MR_Matrix2i_normSq(const MR_Matrix2i *_this)
MRC_API MR_Matrix2b MR_Matrix2b_fromColumns(const MR_Vector2b *x, const MR_Vector2b *y)
MRC_API MR_Matrix2d * MR_Matrix2d_DefaultConstructArray(size_t num_elems)
MRC_API const MR_Vector2i * MR_Matrix2i_index_const(const MR_Matrix2i *_this, int32_t row)
MRC_API MR_Matrix2f MR_Matrix2f_inverse(const MR_Matrix2f *_this)
MRC_API double MR_Matrix2d_trace(const MR_Matrix2d *_this)
MRC_API MR_Matrix2f MR_mul_float_MR_Matrix2f(float a, const MR_Matrix2f *b)
MRC_API MR_Matrix2b MR_Matrix2b_scale_2(bool sx, bool sy)
struct MR_Matrix2b MR_Matrix2b
MRC_API MR_Matrix2i * MR_sub_assign_MR_Matrix2i(MR_Matrix2i *a, const MR_Matrix2i *b)
MRC_API MR_Matrix2d MR_Matrix2d_transposed(const MR_Matrix2d *_this)
MRC_API MR_Matrix2d * MR_sub_assign_MR_Matrix2d(MR_Matrix2d *a, const MR_Matrix2d *b)
MRC_API MR_Matrix2b MR_Matrix2b_scale_1_MR_Vector2b(const MR_Vector2b *s)
MRC_API MR_Matrix2i MR_Matrix2i_scale_2(int32_t sx, int32_t sy)
MRC_API const MR_Vector2i64 * MR_Matrix2i64_index_const(const MR_Matrix2i64 *_this, int32_t row)
MRC_API MR_Matrix2i MR_Matrix2i_scale_1_MR_Vector2i(const MR_Vector2i *s)
MRC_API MR_Matrix2f MR_sub_MR_Matrix2f(const MR_Matrix2f *a, const MR_Matrix2f *b)
MRC_API MR_Matrix2f MR_Matrix2f_rotation_2(const MR_Vector2f *from, const MR_Vector2f *to)
MRC_API MR_Matrix2d MR_Matrix2d_Construct(const MR_Vector2d *x, const MR_Vector2d *y)
MRC_API MR_Matrix2f MR_add_MR_Matrix2f(const MR_Matrix2f *a, const MR_Matrix2f *b)
MRC_API MR_Vector2i MR_Matrix2i_col(const MR_Matrix2i *_this, int32_t i)
MRC_API MR_Matrix2i MR_add_MR_Matrix2i(const MR_Matrix2i *a, const MR_Matrix2i *b)
MRC_API MR_Matrix2f MR_Matrix2f_rotation_1(float angle)
MRC_API MR_Matrix2f * MR_mul_assign_MR_Matrix2f_float(MR_Matrix2f *a, float b)
MRC_API MR_Matrix2b MR_Matrix2b_identity(void)
Generated from a method of class MR::Matrix2b named identity.
MRC_API MR_Matrix2d MR_div_MR_Matrix2d_double(MR_Matrix2d b, double a)
Generated from function MR::operator/.
MRC_API const MR_Vector2b * MR_Matrix2b_index_const(const MR_Matrix2b *_this, int32_t row)
int64_t MR_int64_t
Definition common.h:13
#define MRC_API
Definition exports.h:11
Definition MRMatrix2.h:19
MR_Vector2b y
Definition MRMatrix2.h:22
MR_Vector2b x
rows, identity matrix by default
Definition MRMatrix2.h:21
Definition MRMatrix2.h:55
MR_Vector2d x
rows, identity matrix by default
Definition MRMatrix2.h:57
MR_Vector2d y
Definition MRMatrix2.h:58
Definition MRMatrix2.h:46
MR_Vector2f y
Definition MRMatrix2.h:49
MR_Vector2f x
rows, identity matrix by default
Definition MRMatrix2.h:48
Definition MRMatrix2.h:37
MR_Vector2i64 y
Definition MRMatrix2.h:40
MR_Vector2i64 x
rows, identity matrix by default
Definition MRMatrix2.h:39
Definition MRMatrix2.h:28
MR_Vector2i x
rows, identity matrix by default
Definition MRMatrix2.h:30
MR_Vector2i y
Definition MRMatrix2.h:31
Definition MRVector2.h:20
Definition MRVector2.h:52
Definition MRVector2.h:44
Definition MRVector2.h:36
Definition MRVector2.h:28