#include <RGBAColor.h>
encode a 4 RGBA component color More...
encode a 4 RGBA component color
Static Public Attributes | |
static constexpr sofa::Size | NumberOfComponents = 4 |
static constexpr sofa::Size | static_size = NumberOfComponents |
Public Member Functions | |
constexpr | RGBAColor () |
constexpr | RGBAColor (const std::array< float, NumberOfComponents > &c) |
constexpr | RGBAColor (float r, float g, float b, float a) |
RGBAColor (const type::fixed_array< float, NumberOfComponents > &c)=delete | |
RGBAColor (const type::Vec4f &c)=delete | |
constexpr float & | r () |
constexpr float & | g () |
constexpr float & | b () |
constexpr float & | a () |
constexpr const float & | r () const |
constexpr const float & | g () const |
constexpr const float & | b () const |
constexpr const float & | a () const |
constexpr void | r (const float r) |
constexpr void | g (const float g) |
constexpr void | b (const float b) |
constexpr void | a (const float a) |
constexpr float & | operator[] (std::size_t i) |
constexpr const float & | operator[] (std::size_t i) const |
void | set (float r, float g, float b, float a) |
bool | operator== (const RGBAColor &b) const |
bool | operator!= (const RGBAColor &b) const |
bool | operator< (const RGBAColor &b) const |
RGBAColor | operator* (float f) const |
constexpr const float * | data () const noexcept |
constexpr const ComponentArray & | array () const noexcept |
direct access to array More... | |
constexpr ComponentArray & | array () noexcept |
direct access to array More... | |
constexpr ComponentArray::iterator | begin () noexcept |
constexpr ComponentArray::const_iterator | begin () const noexcept |
constexpr ComponentArray::iterator | end () noexcept |
constexpr ComponentArray::const_iterator | end () const noexcept |
Static Public Member Functions | |
static RGBAColor | fromVec4 (const type::fixed_array< float, 4 > &color)=delete |
static RGBAColor | fromVec4 (const type::fixed_array< double, 4 > &color)=delete |
static RGBAColor | fromVec4 (const Vec4f &color)=delete |
static RGBAColor | fromVec4 (const Vec4d &color)=delete |
static RGBAColor | fromString (const std::string &str) |
static RGBAColor | fromFloat (float r, float g, float b, float a) |
static RGBAColor | fromStdArray (const std::array< float, 4 > &color) |
static RGBAColor | fromStdArray (const std::array< double, 4 > &color) |
static RGBAColor | fromHSVA (float h, float s, float v, float a) |
static bool | read (const std::string &str, RGBAColor &color) |
constexpr static const RGBAColor & | white () |
constexpr static const RGBAColor & | black () |
constexpr static const RGBAColor & | red () |
constexpr static const RGBAColor & | green () |
constexpr static const RGBAColor & | blue () |
constexpr static const RGBAColor & | cyan () |
constexpr static const RGBAColor & | magenta () |
constexpr static const RGBAColor & | yellow () |
constexpr static const RGBAColor & | gray () |
constexpr static const RGBAColor & | darkgray () |
constexpr static const RGBAColor & | lightgray () |
static RGBAColor | lighten (const RGBAColor &in, const SReal factor) |
enlight a color by a given factor. More... | |
static constexpr RGBAColor | clamp (const RGBAColor &color, float min, float max) |
static constexpr sofa::Size | size () |
Friends | |
SOFA_TYPE_API std::ostream & | operator<< (std::ostream &i, const RGBAColor &t) |
Write to an output stream. More... | |
SOFA_TYPE_API std::istream & | operator>> (std::istream &i, RGBAColor &t) |
|
staticconstexpr |
|
staticconstexpr |
|
inlineconstexpr |
|
inlineexplicitconstexpr |
|
delete |
|
delete |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexprnoexcept |
direct access to array
|
inlineconstexprnoexcept |
direct access to array
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
staticconstexpr |
|
staticconstexpr |
|
inlinestaticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
static |
|
static |
|
staticdelete |
|
staticdelete |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
staticconstexpr |
|
staticconstexpr |
enlight a color by a given factor.
|
staticconstexpr |
|
staticconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
staticconstexpr |
|
inlinestaticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
friend |
Write to an output stream.
|
friend |