#include <math.h>
|
static color | white () |
|
static color | black () |
|
static color | transparent () |
|
static color | red () |
|
static color | purple () |
|
static color | random (const char *seed) |
| Generates a consistent random color based on a string seed.
|
|
static color | random (const std::string &seed) |
| Generates a consistent random color based on a string seed.
|
|
static color | hsv (float h, float s, float v, float a=1.0f) |
|
static vec4 | u32_to_float4 (std::uint32_t in) |
|
static std::uint32_t | float4_to_u32 (const vec4 &in) |
|
static void | rgb_to_hsv (float r, float g, float b, float &out_h, float &out_s, float &out_v) |
|
static void | hsv_to_rgb (float h, float s, float v, float &out_r, float &out_g, float &out_b) |
|
Definition at line 283 of file math.h.
◆ color() [1/5]
◆ color() [2/5]
math::color::color |
( |
int | r, |
|
|
int | g, |
|
|
int | b, |
|
|
int | a = 255 ) |
|
inline |
◆ color() [3/5]
math::color::color |
( |
std::uint32_t | rgba | ) |
|
|
inline |
◆ color() [4/5]
math::color::color |
( |
float | r, |
|
|
float | g, |
|
|
float | b, |
|
|
float | a = 1.0f ) |
|
inline |
◆ color() [5/5]
math::color::color |
( |
const vec4 & | col | ) |
|
|
inline |
◆ black()
static color math::color::black |
( |
| ) |
|
|
inlinestatic |
◆ float4_to_u32()
static std::uint32_t math::color::float4_to_u32 |
( |
const vec4 & | in | ) |
|
|
inlinestatic |
◆ hsv()
static color math::color::hsv |
( |
float | h, |
|
|
float | s, |
|
|
float | v, |
|
|
float | a = 1.0f ) |
|
inlinestatic |
◆ hsv_to_rgb()
static void math::color::hsv_to_rgb |
( |
float | h, |
|
|
float | s, |
|
|
float | v, |
|
|
float & | out_r, |
|
|
float & | out_g, |
|
|
float & | out_b ) |
|
inlinestatic |
◆ operator std::uint32_t()
math::color::operator std::uint32_t |
( |
| ) |
const |
|
inline |
◆ operator vec4()
math::color::operator vec4 |
( |
| ) |
const |
|
inline |
◆ purple()
static color math::color::purple |
( |
| ) |
|
|
inlinestatic |
◆ random() [1/2]
static color math::color::random |
( |
const char * | seed | ) |
|
|
inlinestatic |
Generates a consistent random color based on a string seed.
- Parameters
-
seed | The string to use as a seed for random generation. |
- Returns
- A color generated deterministically from the seed.
Definition at line 318 of file math.h.
◆ random() [2/2]
static color math::color::random |
( |
const std::string & | seed | ) |
|
|
inlinestatic |
Generates a consistent random color based on a string seed.
- Parameters
-
seed | The string to use as a seed for random generation. |
- Returns
- A color generated deterministically from the seed.
Definition at line 328 of file math.h.
◆ red()
static color math::color::red |
( |
| ) |
|
|
inlinestatic |
◆ rgb_to_hsv()
static void math::color::rgb_to_hsv |
( |
float | r, |
|
|
float | g, |
|
|
float | b, |
|
|
float & | out_h, |
|
|
float & | out_s, |
|
|
float & | out_v ) |
|
inlinestatic |
◆ set_hsv()
void math::color::set_hsv |
( |
float | h, |
|
|
float | s, |
|
|
float | v, |
|
|
float | a = 1.0f ) |
|
inline |
◆ transparent()
static color math::color::transparent |
( |
| ) |
|
|
inlinestatic |
◆ u32_to_float4()
static vec4 math::color::u32_to_float4 |
( |
std::uint32_t | in | ) |
|
|
inlinestatic |
◆ white()
static color math::color::white |
( |
| ) |
|
|
inlinestatic |
◆ value
vec4 math::color::value {} |
The documentation for this struct was generated from the following file:
- C:/Workspace/github/UnravelEngine/UnravelEngine/engine/core/math/math.h