13 #ifdef LIBCARLA_INCLUDED_FROM_UE4 15 #include "Math/Color.h" 17 #endif // LIBCARLA_INCLUDED_FROM_UE4 35 : r(r), g(g), b(b), a(a) {}
40 return (r == rhs.
r) && (g == rhs.
g) && (b == rhs.
b) && (a == rhs.
a);
44 return !(*
this == rhs);
47 #ifdef LIBCARLA_INCLUDED_FROM_UE4 50 :
FloatColor(color.R / 255.f, color.G / 255.f, color.B / 255.f, color.A / 255.f) {}
53 :
FloatColor(color.R, color.G, color.B, color.A) {}
55 FColor ToFColor()
const {
57 static_cast<uint8
>(r * 255),
58 static_cast<uint8>(g * 255),
59 static_cast<uint8
>(b * 255),
60 static_cast<uint8>(a * 255)};
63 operator FLinearColor()
const {
64 return FLinearColor{
r,
g,
b, a };
67 #endif // LIBCARLA_INCLUDED_FROM_UE4 FloatColor(float r, float g, float b, float a=1.f)
bool operator!=(const FloatColor &rhs) const
MSGPACK_DEFINE_ARRAY(r, g, b, a)
This file contains definitions of common data structures used in traffic manager. ...
FloatColor & operator=(const FloatColor &)=default
bool operator==(const FloatColor &rhs) const