MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::Color Struct Reference

#include <MRColor.h>

Public Member Functions

constexpr Color () noexcept
 
 Color (NoInit) noexcept
 
constexpr Color (int r, int g, int b, int a) noexcept
 
constexpr Color (int r, int g, int b) noexcept
 
constexpr Color (float r, float g, float b, float a) noexcept
 Using a separate overload instead of a default argument to produce better C bindings.
 
constexpr Color (float r, float g, float b) noexcept
 
constexpr unsigned int getUInt32 () const noexcept
 Using a separate overload instead of a default argument to produce better C bindings.
 
template<typename T >
constexpr Color (const Vector3< T > &vec) noexcept
 
template<typename T >
constexpr Color (const Vector4< T > &vec) noexcept
 
template<typename T >
constexpr operator Vector4< T > () const noexcept
 
const uint8_t & operator[] (int e) const
 
uint8_t & operator[] (int e)
 
Coloroperator+= (const Color &other)
 
Coloroperator-= (const Color &other)
 
Coloroperator*= (float m)
 
Coloroperator/= (float m)
 
constexpr Color scaledAlpha (float m) const noexcept
 

Static Public Member Functions

static constexpr Color white () noexcept
 
static constexpr Color black () noexcept
 
static constexpr Color gray () noexcept
 
static constexpr Color red () noexcept
 
static constexpr Color green () noexcept
 
static constexpr Color blue () noexcept
 
static constexpr Color yellow () noexcept
 
static constexpr Color brown () noexcept
 
static constexpr Color purple () noexcept
 
static constexpr Color transparent () noexcept
 
template<typename T >
static constexpr uint8_t valToUint8 (T val) noexcept
 

Public Attributes

uint8_t r
 
uint8_t g
 
uint8_t b
 
uint8_t a
 

The documentation for this struct was generated from the following file: