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#include <stdint.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_NoInit MR_NoInit; // Defined in `#include <MRCMesh/MRMeshFwd.h>`.
15
16
18typedef struct MR_Color
19{
20 uint8_t r;
21 uint8_t g;
22 uint8_t b;
23 uint8_t a;
25
28
33
37
39MRC_API MR_Color MR_Color_Construct_4_int32_t(int32_t r, int32_t g, int32_t b, int32_t a);
40
42MRC_API MR_Color MR_Color_Construct_3_int32_t(int32_t r, int32_t g, int32_t b);
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
53
57
61
65
68MRC_API uint32_t MR_Color_getUInt32(const MR_Color *_this);
69
72
75
78
81
84
87
90
93
96
99
102
105
109MRC_API const uint8_t *MR_Color_index_const(const MR_Color *_this, int32_t e);
110
114MRC_API uint8_t *MR_Color_index(MR_Color *_this, int32_t e);
115
121
127
132
137
141
146
151
156
161
165
169
173
179MRC_API MR_Color MR_blend(const MR_Color *front, const MR_Color *back);
180
181#ifdef __cplusplus
182} // extern "C"
183#endif
struct MR_NoInit MR_NoInit
Definition MRBox.h:16
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 uint8_t MR_Color_valToUint8_float(float val)
Generated from a method of class MR::Color named valToUint8<float>.
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 const uint8_t * MR_Color_index_const(const MR_Color *_this, int32_t e)
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 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_3_int32_t(int32_t r, int32_t g, int32_t b)
Generated from a constructor of class MR::Color.
MRC_API MR_Color MR_Color_Construct_4_int32_t(int32_t r, int32_t g, int32_t b, int32_t a)
Generated from a constructor of class MR::Color.
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 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_Construct_int32_t(const MR_Vector4i *vec)
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 uint32_t MR_Color_getUInt32(const MR_Color *_this)
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 uint8_t MR_Color_valToUint8_int32_t(int32_t val)
Generated from a method of class MR::Color named valToUint8<int32_t>.
MRC_API bool MR_equal_MR_Color(const MR_Color *a, const MR_Color *b)
MRC_API uint8_t * MR_Color_index(MR_Color *_this, int32_t e)
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:19
uint8_t a
Definition MRColor.h:23
uint8_t r
Definition MRColor.h:20
uint8_t b
Definition MRColor.h:22
uint8_t g
Definition MRColor.h:21
Definition MRVector4.h:51
Definition MRVector4.h:31