mn::math Namespace Reference
Classes | |
class | basic_color |
A class for RGBA Color handling. More... | |
union | basic_color.__unnamed3__ |
struct | basic_color.__unnamed3__.__unnamed5__ |
struct | basic_color.__unnamed3__.__unnamed7__ |
Typedefs | |
using | color = basic_color< float > |
Enumerations | |
enum class | color_name : unsigned int { AliceBlue = 0xF0F8FFFF , AntiqueWhite = 0xFAEBD7FF , Aqua = 0x00FFFFFF , Aquamarine = 0x7FFFD4FF , Azure = 0xF0FFFFFF , Beige = 0xF5F5DCFF , Bisque = 0xFFE4C4FF , Black = 0x000000FF , BlanchedAlmond = 0xFFEBCDFF , Blue = 0x0000FFFF , BlueViolet = 0x8A2BE2FF , Brown = 0xA52A2AFF , BurlyWood = 0xDEB887FF , CadetBlue = 0x5F9EA0FF , Chartreuse = 0x7FFF00FF , Chocolate = 0xD2691EFF , Coral = 0xFF7F50FF , CornflowerBlue = 0x6495EDFF , Cornsilk = 0xFFF8DCFF , Crimson = 0xDC143CFF , Cyan = 0x00FFFFFF , DarkBlue = 0x00008BFF , DarkCyan = 0x008B8BFF , DarkGoldenrod = 0xB8860BFF , DarkGray = 0xA9A9A9FF , DarkGreen = 0x006400FF , DarkKhaki = 0xBDB76BFF , DarkMagenta = 0x8B008BFF , DarkOliveGreen = 0x556B2FFF , DarkOrange = 0xFF8C00FF , DarkOrchid = 0x9932CCFF , DarkRed = 0x8B0000FF , DarkSalmon = 0xE9967AFF , DarkSeaGreen = 0x8FBC8FFF , DarkSlateBlue = 0x8FBC8FFF , DarkSlateGray = 0x2F4F4FFF , DarkTurquoise = 0x00CED1FF , DarkViolet = 0x9400D3FF , DeepPink = 0xFF1493FF , DeepSkyBlue = 0x00BFFFFF , DimGray = 0x696969FF , DodgerBlue = 0x1E90FFFF , FireBrick = 0xB22222FF , FloralWhite = 0xFFFAF0FF , ForestGreen = 0x228B22FF , Fuchsia = 0xFF00FFFF , Gainsboro = 0xDCDCDCFF , GhostWhite = 0xF8F8FFFF , Gold = 0xFFD700FF , Goldenrod = 0xDAA520FF , Gray = 0x808080FF , Green = 0x008000FF , GreenYellow = 0xADFF2FFF , Honeydew = 0xF0FFF0FF , IndianRed = 0xCD5C5CFF , Indigo = 0x4B0082FF , Ivory = 0xFFFFF0FF , Khaki = 0xF0E68CFF , Lavender = 0xE6E6FAFF , LavenderBlush = 0xFFF0F5FF , LawnGreen = 0x7CFC00FF , LemonChiffon = 0xFFFACDFF , LightBlue = 0xADD8E6FF , LightCoral = 0xF08080FF , LightCyan = 0xE0FFFFFF , LightGoldenrodYellow = 0xFAFAD2FF , LightGreen = 0x90EE90FF , LightGrey = 0xD3D3D3FF , LightPink = 0x228B22FF , LightSalmon = 0xFFA07AFF , LightSeaGreen = 0x20B2AAFF , LightSkyBlue = 0x87CEFAFF , LightSlateGray = 0x778899FF , LightSteelBlue = 0xB0C4DEFF , LightYellow = 0xFFFFE0FF , Lime = 0x00FF00FF , LimeGreen = 0x32CD32FF , Linen = 0xFAF0E6FF , Magenta = 0xFF00FFFF , Maroon = 0x800000FF , MediumAquamarine = 0x66CDAAFF , MediumBlue = 0x0000CDFF , MediumOrchid = 0xBA55D3FF , MediumPurple = 0x9370DBFF , MediumSeaGreen = 0x3CB371FF , MediumSlateBlue = 0x7B68EEFF , MediumSpringGreen = 0x00FA9AFF , MediumTurquoise = 0x48D1CCFF , MediumVioletRed = 0xC71585FF , MidnightBlue = 0x191970FF , MintCream = 0xF5FFFAFF , MistyRose = 0xFFE4E1FF , Moccasin = 0xFFE4B5FF , NavajoWhite = 0xFFDEADFF , Navy = 0x000080FF , OldLace = 0xFDF5E6FF , Olive = 0x808000FF , OliveDrab = 0x6B8E23FF , Orange = 0xFFA500FF , OrangeRed = 0xFF4500FF , Orchid = 0xDA70D6FF , PaleGoldenrod = 0xEEE8AAFF , PaleGreen = 0x98FB98FF , PaleTurquoise = 0xAFEEEEFF , PaleVioletRed = 0xDB7093FF , PapayaWhip = 0xFFEFD5FF , PeachPuff = 0xFFDAB9FF , Peru = 0xCD853FFF , Pink = 0xFFC0CBFF , Plum = 0xDDA0DDFF , PowderBlue = 0xB0E0E6FF , Purple = 0x800080FF , Red = 0xFF0000FF , RosyBrown = 0xBC8F8FFF , RoyalBlue = 0x4169E1FF , SaddleBrown = 0x8B4513FF , Salmon = 0xFA8072FF , SandyBrown = 0xF4A460FF , SeaGreen = 0x2E8B57FF , Seashell = 0xFFF5EEFF , Sienna = 0xA0522DFF , Silver = 0xC0C0C0FF , SkyBlue = 0x87CEEBFF , SlateBlue = 0x6A5ACDFF , SlateGray = 0x708090FF , Snow = 0xFFFAFAFF , SpringGreen = 0x00FF7FFF , SteelBlue = 0x4682B4FF , Tan = 0xD2B48CFF , Teal = 0x008080FF , Thistle = 0xD8BFD8FF , Tomato = 0xFF6347FF , Turquoise = 0x40E0D0FF , Violet = 0xEE82EEFF , Wheat = 0xF5DEB3FF , White = 0xFFFFFFFF , WhiteSmoke = 0xF5F5F5FF , Yellow = 0xFFFF00FF , YellowGreen = 0x9ACD32FF } |
Functions | |
template<typename T > | |
basic_color< T > | operator+ (const basic_color< T > &a, const basic_color< T > &b) |
template<typename T > | |
basic_color< T > | operator- (const basic_color< T > &a, const basic_color< T > &b) |
template<typename T > | |
basic_color< T > | operator- (const basic_color< T > &c) |
template<typename T > | |
basic_color< T > | operator* (const basic_color< T > &a, const basic_color< T > &b) |
template<typename T > | |
basic_color< T > | operator* (const basic_color< T > &c, const T f) |
template<typename T > | |
basic_color< T > | operator* (const T f, const basic_color< T > &c) |
template<typename T > | |
basic_color< T > | operator/ (const basic_color< T > &a, const basic_color< T > &b) |
template<typename T > | |
basic_color< T > | operator/ (const basic_color< T > &c, const T f) |
template<typename T > | |
bool | operator== (const basic_color< T > &a, const basic_color< T > &b) |
template<typename T > | |
bool | operator!= (const basic_color< T > &a, const basic_color< T > &b) |
template<typename T > | |
basic_color< T > | negate (const basic_color< T > &c) |
negate More... | |
template<typename T > | |
T | brightness (const basic_color< T > &c) |
brightness More... | |
template<typename T > | |
basic_color< T > | interpolate (const basic_color< T > &c1, const basic_color< T > &c2, const T p) |
interpolate More... | |
template<typename T > | |
basic_color< T > | min (const basic_color< T > &c1, const basic_color< T > &c2) |
Get the min color. More... | |
template<typename T > | |
basic_color< T > | max (const basic_color< T > &c1, const basic_color< T > &c2) |
Get the max color. More... | |
template<typename T > | |
basic_color< T > | from_yuv (const T y, const T u, const T v) |
Create a RGBA color object from a yuv. More... | |
template<typename T > | |
basic_color< T > | from_cmy (const T c, const T m, const T y) |
Create a RGBA color object from a cmy. More... | |
template<typename T > | |
basic_color< T > | from_hsv (const T h, const T s, const T v) |
Create a RGBA color object from a hsv. More... | |
template<typename T > | |
basic_color< T > | from_name (const color_name &name) |
Create a color from a name. More... | |
Variables | |
constexpr double | pi = 3.14159265358979 |
constexpr double | pi_reciprocal = 0.31830988618379 |
constexpr double | pi_squared = 9.86960440108936 |
constexpr double | e = 2.71828182845905 |
constexpr double | e_reciprocal = 0.36787944117144 |
constexpr double | e_squared = 7.38905609893065 |
constexpr double | root2 = 1.41421356237310 |
constexpr double | root2_reciprocal = 0.70710678118655 |
constexpr double | euler = 0.57721566490153 |
constexpr double | golden_ratio = 1.61803398874989 |
Class Documentation
◆ mn::math::basic_color.__unnamed3__
union mn::math::basic_color.__unnamed3__ |
Class Members | ||
---|---|---|
__unnamed3__ | __unnamed__ | |
__unnamed3__ | __unnamed__ | |
value_type | c[4] |
◆ mn::math::basic_color.__unnamed3__.__unnamed5__
struct mn::math::basic_color.__unnamed3__.__unnamed5__ |
◆ mn::math::basic_color.__unnamed3__.__unnamed7__
struct mn::math::basic_color.__unnamed3__.__unnamed7__ |
Typedef Documentation
◆ color
using mn::math::color = typedef basic_color<float> |
Enumeration Type Documentation
◆ color_name
|
strong |
Function Documentation
◆ brightness()
template<typename T >
|
inline |
brightness
◆ from_cmy()
template<typename T >
basic_color<T> mn::math::from_cmy | ( | const T | c, |
const T | m, | ||
const T | y | ||
) |
Create a RGBA color object from a cmy.
◆ from_hsv()
template<typename T >
basic_color<T> mn::math::from_hsv | ( | const T | h, |
const T | s, | ||
const T | v | ||
) |
Create a RGBA color object from a hsv.
◆ from_name()
template<typename T >
basic_color<T> mn::math::from_name | ( | const color_name & | name | ) |
Create a color from a name.
- Parameters
-
name The name of the color
- Returns
- the color
◆ from_yuv()
template<typename T >
basic_color<T> mn::math::from_yuv | ( | const T | y, |
const T | u, | ||
const T | v | ||
) |
Create a RGBA color object from a yuv.
◆ interpolate()
template<typename T >
|
inline |
interpolate
- Parameters
-
c1 The start color c2 The end color p The step
- Returns
- The interpolated color
◆ max()
template<typename T >
|
inline |
Get the max color.
- Returns
- The max color
◆ min()
template<typename T >
|
inline |
Get the min color.
- Returns
- The min color
◆ negate()
template<typename T >
|
inline |
negate
◆ operator!=()
template<typename T >
|
inline |
◆ operator*() [1/3]
template<typename T >
|
inline |
◆ operator*() [2/3]
template<typename T >
|
inline |
◆ operator*() [3/3]
template<typename T >
|
inline |
◆ operator+()
template<typename T >
|
inline |
◆ operator-() [1/2]
template<typename T >
|
inline |
◆ operator-() [2/2]
template<typename T >
|
inline |
◆ operator/() [1/2]
template<typename T >
|
inline |
◆ operator/() [2/2]
template<typename T >
|
inline |
◆ operator==()
template<typename T >
|
inline |
Variable Documentation
◆ e
|
constexpr |
◆ e_reciprocal
|
constexpr |
◆ e_squared
|
constexpr |
◆ euler
|
constexpr |
◆ golden_ratio
|
constexpr |
◆ pi
|
constexpr |
◆ pi_reciprocal
|
constexpr |
◆ pi_squared
|
constexpr |
◆ root2
|
constexpr |
◆ root2_reciprocal
|
constexpr |