MeshLib C Docs
Loading...
Searching...
No Matches
MRColor.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRVector4.h>
4#include <MRCMisc/exports.h>
5
6#include <stdbool.h>
7#include <stddef.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef struct MR_NoInit MR_NoInit; // Defined in `#include <MRCMesh/MRMeshFwd.h>`.
14
15
17typedef struct MR_Color
18{
19 unsigned char r;
20 unsigned char g;
21 unsigned char b;
22 unsigned char a;
24
27
32
37
39MRC_API MR_Color MR_Color_Construct_4_int(int r, int g, int b, int a);
40
43
45MRC_API MR_Color MR_Color_Construct_4_float(float r, float g, float b, float a);
46
48MRC_API MR_Color MR_Color_Construct_3_float(float r, float g, float b);
49
54
59
63
67
70MRC_API unsigned int MR_Color_getUInt32(const MR_Color *_this);
71
74
77
80
83
86
89
92
95
98
101
103MRC_API unsigned char MR_Color_valToUint8_int(int val);
104
106MRC_API unsigned char MR_Color_valToUint8_float(float val);
107
111MRC_API const unsigned char *MR_Color_index_const(const MR_Color *_this, int e);
112
116MRC_API unsigned char *MR_Color_index(MR_Color *_this, int e);
117
123
129
134
139
143
148
153
158
163
167
171
175
181MRC_API MR_Color MR_blend(const MR_Color *front, const MR_Color *back);
182
183#ifdef __cplusplus
184} // extern "C"
185#endif
struct MR_NoInit MR_NoInit
Definition MRBox.h:15
MRC_API MR_Color MR_sub_MR_Color(const MR_Color *a, const MR_Color *b)
MRC_API MR_Color * MR_Color_add_assign(MR_Color *_this, const MR_Color *other)
MRC_API MR_Color MR_mul_float_MR_Color(float a, const MR_Color *b)
MRC_API MR_Color MR_Color_gray(void)
Generated from method MR::Color::gray.
MRC_API MR_Color MR_Color_blue(void)
Generated from method MR::Color::blue.
MRC_API MR_Color MR_Color_black(void)
Generated from method MR::Color::black.
MRC_API MR_Color MR_Color_DefaultConstruct(void)
Constructs an empty (default-constructed) instance.
MRC_API MR_Color MR_Color_Construct_1(const MR_NoInit *_1)
MRC_API MR_Color MR_blend(const MR_Color *front, const MR_Color *back)
MRC_API MR_Color MR_Color_green(void)
Generated from method MR::Color::green.
MRC_API unsigned int MR_Color_getUInt32(const MR_Color *_this)
MRC_API MR_Color MR_Color_Construct_4_float(float r, float g, float b, float a)
Generated from constructor MR::Color::Color.
MRC_API MR_Color MR_Color_red(void)
Generated from method MR::Color::red.
MRC_API MR_Color * MR_Color_mul_assign(MR_Color *_this, float m)
MRC_API MR_Color MR_Color_Construct_4_int(int r, int g, int b, int a)
Generated from constructor MR::Color::Color.
MRC_API unsigned char MR_Color_valToUint8_int(int val)
Generated from method MR::Color::valToUint8<int>.
MRC_API unsigned char * MR_Color_index(MR_Color *_this, int e)
MRC_API MR_Color MR_Color_Construct_int(const MR_Vector4i *vec)
MRC_API const unsigned char * MR_Color_index_const(const MR_Color *_this, int e)
MRC_API MR_Color MR_Color_scaledAlpha(const MR_Color *_this, float m)
MRC_API MR_Color MR_div_MR_Color_float(const MR_Color *b, float a)
MRC_API MR_Color MR_Color_Construct_3_int(int r, int g, int b)
Generated from constructor MR::Color::Color.
MRC_API bool MR_not_equal_MR_Color(const MR_Color *a, const MR_Color *b)
MRC_API MR_Vector4i MR_Color_ConvertTo_MR_Vector4i(const MR_Color *_this)
MRC_API MR_Color MR_Color_purple(void)
Generated from method MR::Color::purple.
struct MR_Color MR_Color
Generated from class MR::Color.
MRC_API MR_Color MR_add_MR_Color(const MR_Color *a, const MR_Color *b)
MRC_API MR_Color MR_Color_white(void)
Generated from method MR::Color::white.
MRC_API MR_Color MR_Color_brown(void)
Generated from method MR::Color::brown.
MRC_API MR_Color * MR_Color_div_assign(MR_Color *_this, float m)
MRC_API unsigned char MR_Color_valToUint8_float(float val)
Generated from method MR::Color::valToUint8<float>.
MRC_API MR_Color MR_Color_yellow(void)
Generated from method MR::Color::yellow.
MRC_API MR_Color MR_mul_MR_Color_float(const MR_Color *b, float a)
MRC_API MR_Color * MR_Color_sub_assign(MR_Color *_this, const MR_Color *other)
MRC_API MR_Color MR_Color_Construct_3_float(float r, float g, float b)
Generated from constructor MR::Color::Color.
MRC_API MR_Color MR_Color_transparent(void)
Generated from method MR::Color::transparent.
MRC_API MR_Vector4f MR_Color_ConvertTo_MR_Vector4f(const MR_Color *_this)
MRC_API bool MR_equal_MR_Color(const MR_Color *a, const MR_Color *b)
MRC_API MR_Color * MR_Color_DefaultConstructArray(size_t num_elems)
MRC_API MR_Color MR_Color_Construct_float(const MR_Vector4f *vec)
#define MRC_API
Definition exports.h:11
Generated from class MR::Color.
Definition MRColor.h:18
unsigned char a
Definition MRColor.h:22
unsigned char g
Definition MRColor.h:20
unsigned char r
Definition MRColor.h:19
unsigned char b
Definition MRColor.h:21
Definition MRVector4.h:52
Definition MRVector4.h:32