MeshLib C++ Docs
Loading...
Searching...
No Matches
MRMeshC/MRColor.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRVector.h"
5
7
9typedef struct MRColor
10{
11 uint8_t r, g, b, a;
16MRMESHC_API MRColor mrColorFromComponents( uint8_t r, uint8_t g, uint8_t b, uint8_t a );
18MRMESHC_API MRColor mrColorFromFloatComponents( float r, float g, float b, float a );
20MRMESHC_API unsigned int mrColorGetUInt32( const MRColor* color );
21
22MR_VECTOR_LIKE_DECL( VertColors, Color )
23
24
25MRMESHC_API MRVertColors* mrVertColorsNewSized( size_t size );
26
MRMESHC_API MRVertColors * mrVertColorsNewSized(size_t size)
needed for manual creation of a color map with given size
MRMESHC_API MRColor mrColorFromComponents(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
creates color from byte components [0..255]
MR_EXTERN_C_BEGIN struct MRColor MRColor
stores a color in 32-bit RGBA format
MRMESHC_API MRColor mrColorFromFloatComponents(float r, float g, float b, float a)
creates color from float components [0..1]
MRMESHC_API MRColor mrColorNew(void)
creates opaque black by default
MRMESHC_API unsigned int mrColorGetUInt32(const MRColor *color)
returns color as unsigned int
#define MR_EXTERN_C_BEGIN
Definition MRMeshC/MRMeshFwd.h:26
#define MR_EXTERN_C_END
Definition MRMeshC/MRMeshFwd.h:27
#define MRMESHC_API
Definition MRMeshC/MRMeshFwd.h:19
#define MR_VECTOR_LIKE_DECL(ClassName, Type)
Definition MRMeshC/MRVector.h:19
stores a color in 32-bit RGBA format
Definition MRMeshC/MRColor.h:10
uint8_t b
Definition MRMeshC/MRColor.h:11
uint8_t r
Definition MRMeshC/MRColor.h:11
uint8_t a
Definition MRMeshC/MRColor.h:11
uint8_t g
Definition MRMeshC/MRColor.h:11