MeshLib C++ Docs
Loading...
Searching...
No Matches
MRColor.h File Reference
#include "MRMeshFwd.h"
#include "MRVector.h"

Go to the source code of this file.

Classes

struct  MRColor
 stores a color in 32-bit RGBA format More...
 

Typedefs

typedef MR_EXTERN_C_BEGIN struct MRColor MRColor
 stores a color in 32-bit RGBA format
 

Functions

MRMESHC_API MRColor mrColorNew (void)
 creates opaque black by default
 
MRMESHC_API MRColor mrColorFromComponents (uint8_t r, uint8_t g, uint8_t b, uint8_t a)
 creates color from byte components [0..255]
 
MRMESHC_API MRColor mrColorFromFloatComponents (float r, float g, float b, float a)
 creates color from float components [0..1]
 
MRMESHC_API unsigned int mrColorGetUInt32 (const MRColor *color)
 returns color as unsigned int
 
MRMESHC_API MRVertColors * mrVertColorsNewSized (size_t size)
 needed for manual creation of a color map with given size
 

Typedef Documentation

◆ MRColor

typedef MR_EXTERN_C_BEGIN struct MRColor MRColor

stores a color in 32-bit RGBA format

Function Documentation

◆ mrColorFromComponents()

MRMESHC_API MRColor mrColorFromComponents ( uint8_t r,
uint8_t g,
uint8_t b,
uint8_t a )

creates color from byte components [0..255]

◆ mrColorFromFloatComponents()

MRMESHC_API MRColor mrColorFromFloatComponents ( float r,
float g,
float b,
float a )

creates color from float components [0..1]

◆ mrColorGetUInt32()

MRMESHC_API unsigned int mrColorGetUInt32 ( const MRColor * color)

returns color as unsigned int

◆ mrColorNew()

MRMESHC_API MRColor mrColorNew ( void )

creates opaque black by default

◆ mrVertColorsNewSized()

MRMESHC_API MRVertColors * mrVertColorsNewSized ( size_t size)

needed for manual creation of a color map with given size