1 #ifndef MESH_IO_COLOR_H_INCLUDED
2 #define MESH_IO_COLOR_H_INCLUDED
7 //! Byte
\95Û
\8e\9d\82ÌGBA
18 bRGBA(int _r, int _g, int _b, int _a)
19 : r(_r), g(_g), b(_b), a(_a)
22 static bRGBA createFromUInt(unsigned int uint)
26 uint & 0x0000FF00 >> 8,
27 uint & 0x00FF0000 >> 16,
28 uint & 0xFF000000 >> 24
33 inline std::ostream &operator<<(std::ostream &os, const bRGBA &rhs)
36 << '[' << rhs.r << ',' << rhs.g << ',' << rhs.b << ',' << rhs.a << ']';
41 //! Float
\95Û
\8e\9d\82ÌRGBA
52 fRGBA(float _r, float _g, float _b, float _a)
53 : r(_r), g(_g), b(_b), a(_a)
56 static fRGBA createFromUInt(unsigned int uint)
59 (uint & 0x000000FF) / 255.0f,
60 (uint & 0x0000FF00 >> 8) / 255.0f,
61 (uint & 0x00FF0000 >> 16) / 255.0f,
62 (uint & 0xFF000000 >> 24) / 255.0f
67 inline std::ostream &operator<<(std::ostream &os, const fRGBA &rhs)
70 << '[' << rhs.r << ',' << rhs.g << ',' << rhs.b << ',' << rhs.a << ']';
75 //! Float
\95Û
\8e\9d\82ÌRGB
83 inline std::ostream &operator<<(std::ostream &os, const fRGB &rhs)
86 << '[' << rhs.r << ',' << rhs.g << ',' << rhs.b << ',' << ']';
94 #endif // MESH_IO_COLOR_H_INCLUDED