25 Color(
float r,
float g,
float b,
float a);
33 explicit Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a);
97 const float scale = 1.0f / 255.0f;
98 this->
vec = _mm_setr_ps(
99 scale * ((argb >> 16) & 0xFF), scale * ((argb >> 8) & 0xFF), scale * (argb & 0xFF), scale * ((argb >> 24) & 0xFF)
108 const float scale = 1.0f / 255.0f;
109 this->
vec = _mm_setr_ps(scale * r, scale * g, scale * b, scale * a);
118 return Color((uint8_t)((rgba >> 24) & 0xFF), (uint8_t)((rgba >> 16) & 0xFF), (uint8_t)((rgba >> 8) & 0xFF), (uint8_t)(rgba & 0xFF));
Represents colors by four single point (32-bit) floating point numbers.
Definition color.h:18
static const Color blue
Predefined color. (0x0000FF)
Definition color.h:46
static const Color green
Predefined color. (0x00FF00)
Definition color.h:44
static const Color yellow
Predefined color. (0xFFFF00)
Definition color.h:48
static const Color purple
Predefined color. (0xA020F0)
Definition color.h:50
static Color ARGB(uint32_t argb)
Create color from unsigned int (R|G|B|A) -> 0..1 floats.
Definition color.h:125
static const Color white
Predefined color. (0xFFFFFF)
Definition color.h:56
static Color RGBA(uint32_t rgba)
Create color from unsigned int (A|R|G|B) -> 0..1 floats.
Definition color.h:116
static const Color gray
Predefined color. (0xBEBEBE)
Definition color.h:58
static const Color red
Predefined color. (0xFF0000)
Definition color.h:42
static const Color black
Predefined color. (0x000000)
Definition color.h:54
Color(const Color &c)=default
static const Color orange
Predefined color. (0xFFA500)
Definition color.h:52
Different curves.
Definition angularpfeedbackloop.h:17
A pinned array is an array which manages its own virtual memory.
Definition String.cs:6
A 3D vector.
Definition vec3.h:40
A 4D vector.
Definition vec4.h:24
vec4()=default
default constructor, NOTE: does NOT setup components!
__m128 vec
Definition vec4.h:97
float v[4]
Definition vec4.h:98