Jolt Physics
A multi core friendly Game Physics Engine
|
Class that holds an RGBA color with 8-bits per component. More...
#include <Color.h>
Public Member Functions | |
Color ()=default | |
Constructors. | |
Color (const Color &inRHS)=default | |
Color & | operator= (const Color &inRHS)=default |
constexpr | Color (uint32 inColor) |
constexpr | Color (uint8 inRed, uint8 inGreen, uint8 inBlue, uint8 inAlpha=255) |
constexpr | Color (ColorArg inRHS, uint8 inAlpha) |
bool | operator== (ColorArg inRHS) const |
Comparison. | |
bool | operator!= (ColorArg inRHS) const |
uint32 | GetUInt32 () const |
Convert to uint32. | |
uint8 | operator() (uint inIdx) const |
Element access, 0 = red, 1 = green, 2 = blue, 3 = alpha. | |
uint8 & | operator() (uint inIdx) |
Color | operator* (const Color &inRHS) const |
Multiply two colors. | |
Color | operator* (float inIntensity) const |
Multiply color with intensity in the range [0, 1]. | |
Vec4 | ToVec4 () const |
Convert to Vec4 with range [0, 1]. | |
uint8 | GetIntensity () const |
Get grayscale intensity of color. | |
Static Public Member Functions | |
static Color | sGetDistinctColor (int inIndex) |
Get a visually distinct color. | |
Public Attributes | ||
union { | ||
uint32 mU32 | ||
Combined value for red, green, blue and alpha. More... | ||
struct { | ||
uint8 r | ||
Red channel. More... | ||
uint8 g | ||
Green channel. More... | ||
uint8 b | ||
Blue channel. More... | ||
uint8 a | ||
Alpha channel. More... | ||
} | ||
}; | ||
Static Public Attributes | |
static const Color | sBlack |
Predefined colors. | |
static const Color | sDarkRed |
static const Color | sRed |
static const Color | sDarkGreen |
static const Color | sGreen |
static const Color | sDarkBlue |
static const Color | sBlue |
static const Color | sYellow |
static const Color | sPurple |
static const Color | sCyan |
static const Color | sOrange |
static const Color | sDarkOrange |
static const Color | sGrey |
static const Color | sLightGrey |
static const Color | sWhite |
Class that holds an RGBA color with 8-bits per component.
|
default |
Constructors.
Intentionally not initialized for performance reasons
|
default |
|
inlineexplicitconstexpr |
|
inlineconstexpr |
|
inline |
Get grayscale intensity of color.
|
inline |
Convert to uint32.
|
inline |
Element access, 0 = red, 1 = green, 2 = blue, 3 = alpha.
|
inline |
Multiply color with intensity in the range [0, 1].
|
inline |
Comparison.
|
static |
Get a visually distinct color.
union { ... } Color |
uint8 Color::a |
Alpha channel.
uint8 Color::b |
Blue channel.
uint8 Color::g |
Green channel.
uint32 Color::mU32 |
Combined value for red, green, blue and alpha.
uint8 Color::r |
Red channel.
|
static |
Predefined colors.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |