14 namespace visualization {
20 : rgba_{r, g, b, a} {}
23 : rgba_{rgb.x(), rgb.y(), rgb.z(), 1.0f} {}
26 return (this->rgba_[0] == rhs.rgba_[0] && this->rgba_[1] == rhs.rgba_[1] &&
27 this->rgba_[2] == rhs.rgba_[2] && this->rgba_[3] == rhs.rgba_[3]);
54 return Color((1.0f - amount) *
GetRed() + amount * 1.0f,
55 (1.0f - amount) *
GetGreen() + amount * 1.0f,
60 unsigned int a = (
unsigned int)std::round(
GetAlpha() * 255.0f);
61 unsigned int b = (
unsigned int)std::round(
GetBlue() * 255.0f);
62 unsigned int g = (
unsigned int)std::round(
GetGreen() * 255.0f);
63 unsigned int r = (
unsigned int)std::round(
GetRed() * 255.0f);
64 return ((a << 24) | (b << 16) | (g << 8) | r);
float * GetMutablePointer()
unsigned int ToABGR32() const
bool operator==(const Color &rhs) const
const float * GetPointer() const
void SetColor(float r, float g, float b, float a=1.0)
bool operator!=(const Color &rhs) const
Color Lightened(float amount)
Generic file read and write utility for python interface.