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
36
38MRC_API MR_Color MR_Color_Construct_4_int(int r, int g, int b, int a);
39
42
44MRC_API MR_Color MR_Color_Construct_4_float(float r, float g, float b, float a);
45
47MRC_API MR_Color MR_Color_Construct_3_float(float r, float g, float b);
48
52
56
60
64
67MRC_API unsigned int MR_Color_getUInt32(const MR_Color *_this);
68
71
74
77
80
83
86
89
92
95
98
100MRC_API unsigned char MR_Color_valToUint8_int(int val);
101
103MRC_API unsigned char MR_Color_valToUint8_float(float val);
104
108MRC_API const unsigned char *MR_Color_index_const(const MR_Color *_this, int e);
109
113MRC_API unsigned char *MR_Color_index(MR_Color *_this, int e);
114
120
126
131
136
140
145
150
155
160
164
168
172
178MRC_API MR_Color MR_blend(const MR_Color *front, const MR_Color *back);
179
180#ifdef __cplusplus
181} // extern "C"
182#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 a method of class MR::Color named gray.
MRC_API MR_Color MR_Color_blue(void)
Generated from a method of class MR::Color named blue.
MRC_API MR_Color MR_Color_black(void)
Generated from a method of class MR::Color named 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 a method of class MR::Color named 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 a constructor of class MR::Color.
MRC_API MR_Color MR_Color_red(void)
Generated from a method of class MR::Color named 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 a constructor of class MR::Color.
MRC_API unsigned char MR_Color_valToUint8_int(int val)
Generated from a method of class MR::Color named 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 a constructor of class MR::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 a method of class MR::Color named 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 a method of class MR::Color named white.
MRC_API MR_Color MR_Color_brown(void)
Generated from a method of class MR::Color named 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 a method of class MR::Color named valToUint8<float>.
MRC_API MR_Color MR_Color_yellow(void)
Generated from a method of class MR::Color named 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 a constructor of class MR::Color.
MRC_API MR_Color MR_Color_transparent(void)
Generated from a method of class MR::Color named 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:50
Definition MRVector4.h:30