34 #ifndef CARTOBASE_TYPE_RGBA_DECL_H
35 #define CARTOBASE_TYPE_RGBA_DECL_H
81 VoxelRGBA(
const uint8_t &r = 0,
const uint8_t &g = 0,
82 const uint8_t &b = 0,
const uint8_t &a = 0 );
114 inline const uint8_t&
red ()
const {
return (*
this)[0]; }
115 inline const uint8_t&
green ()
const {
return (*
this)[1]; }
116 inline const uint8_t&
blue ()
const {
return (*
this)[2]; }
117 inline const uint8_t&
alpha ()
const {
return (*
this)[3]; }
118 inline uint8_t&
red () {
return (*
this)[0]; }
119 inline uint8_t&
green () {
return (*
this)[1]; }
120 inline uint8_t&
blue () {
return (*
this)[2]; }
121 inline uint8_t&
alpha () {
return (*
this)[3]; }
124 VoxelRGBA
operator + (
const VoxelRGBA &aa,
const VoxelRGBA &bb);
125 VoxelRGBA
operator + (
const VoxelRGBA &aa,
const uint8_t &bb);
126 VoxelRGBA
operator + (
const VoxelRGBA &aa,
const uint16_t &bb);
127 VoxelRGBA
operator + (
const VoxelRGBA &aa,
const uint32_t &bb);
128 VoxelRGBA
operator + (
const VoxelRGBA &aa,
const uint64_t &bb);
129 VoxelRGBA
operator + (
const VoxelRGBA &aa,
const float &bb);
130 VoxelRGBA
operator + (
const VoxelRGBA &aa,
const double &bb);
131 VoxelRGBA
operator + (
const uint8_t &aa,
const VoxelRGBA &bb);
132 VoxelRGBA
operator + (
const uint16_t &aa,
const VoxelRGBA &bb);
133 VoxelRGBA
operator + (
const uint32_t &aa,
const VoxelRGBA &bb);
134 VoxelRGBA
operator + (
const uint64_t &aa,
const VoxelRGBA &bb);
135 VoxelRGBA
operator + (
const float &aa,
const VoxelRGBA &bb);
136 VoxelRGBA
operator + (
const double &aa,
const VoxelRGBA &bb);
137 VoxelRGBA
operator - (
const VoxelRGBA &aa,
const VoxelRGBA &bb);
138 VoxelRGBA
operator - (
const VoxelRGBA &aa,
const uint8_t &bb);
139 VoxelRGBA
operator - (
const VoxelRGBA &aa,
const uint16_t &bb);
140 VoxelRGBA
operator - (
const VoxelRGBA &aa,
const uint32_t &bb);
141 VoxelRGBA
operator - (
const VoxelRGBA &aa,
const uint64_t &bb);
142 VoxelRGBA
operator - (
const VoxelRGBA &aa,
const float &bb);
143 VoxelRGBA
operator - (
const VoxelRGBA &aa,
const double &bb);
144 VoxelRGBA
operator - (
const uint8_t &aa,
const VoxelRGBA &bb);
145 VoxelRGBA
operator - (
const uint16_t &aa,
const VoxelRGBA &bb);
146 VoxelRGBA
operator - (
const uint32_t &aa,
const VoxelRGBA &bb);
147 VoxelRGBA
operator - (
const uint64_t &aa,
const VoxelRGBA &bb);
148 VoxelRGBA
operator - (
const float &aa,
const VoxelRGBA &bb);
149 VoxelRGBA
operator - (
const double &aa,
const VoxelRGBA &bb);
150 VoxelRGBA
operator * (
const VoxelRGBA &aa,
const uint8_t &bb);
151 VoxelRGBA
operator * (
const VoxelRGBA &aa,
const uint16_t &bb);
152 VoxelRGBA
operator * (
const VoxelRGBA &aa,
const uint32_t &bb);
153 VoxelRGBA
operator * (
const VoxelRGBA &aa,
const uint64_t &bb);
154 VoxelRGBA
operator * (
const VoxelRGBA &aa,
const float &bb);
155 VoxelRGBA
operator * (
const VoxelRGBA &aa,
const double &bb);
156 VoxelRGBA
operator * (
const uint8_t &aa,
const VoxelRGBA &bb);
157 VoxelRGBA
operator * (
const uint16_t &aa,
const VoxelRGBA &bb);
158 VoxelRGBA
operator * (
const uint32_t &aa,
const VoxelRGBA &bb);
159 VoxelRGBA
operator * (
const uint64_t &aa,
const VoxelRGBA &bb);
160 VoxelRGBA
operator * (
const float &aa,
const VoxelRGBA &bb);
161 VoxelRGBA
operator * (
const double &aa,
const VoxelRGBA &bb);
162 VoxelRGBA
operator / (
const VoxelRGBA &aa,
const uint8_t &bb);
163 VoxelRGBA
operator / (
const VoxelRGBA &aa,
const uint16_t &bb);
164 VoxelRGBA
operator / (
const VoxelRGBA &aa,
const uint32_t &bb);
165 VoxelRGBA
operator / (
const VoxelRGBA &aa,
const uint64_t &bb);
166 VoxelRGBA
operator / (
const VoxelRGBA &aa,
const float &bb);
167 VoxelRGBA
operator / (
const VoxelRGBA &aa,
const double &bb);
169 VoxelRGBA
operator * (
const VoxelRGBA &aa,
const long &bb);
170 VoxelRGBA
operator * (
const long &aa,
const VoxelRGBA &bb);
171 VoxelRGBA
operator / (
const VoxelRGBA &aa,
const long &bb);
static std::string dataType()
VoxelRGBA & operator*=(const uint8_t &value)
const uint8_t & green() const
const uint8_t & blue() const
VoxelRGBA & operator+=(const VoxelRGBA &other)
VoxelRGBA & operator/=(const uint8_t &value)
const uint8_t & alpha() const
VoxelRGBA & operator=(const VoxelRGBA &other)
VoxelRGBA & operator-=(const VoxelRGBA &other)
const uint8_t & red() const
VoxelRGBA(const VoxelRGBA &other)
Base class for any multichannel data (RGB, RGBA, HSV, ...)
VoxelRGB operator/(const VoxelRGB &aa, const uint8_t &bb)
VoxelRGB operator+(const VoxelRGB &aa, const VoxelRGB &bb)
VoxelRGB operator-(const VoxelRGB &aa, const VoxelRGB &bb)
VoxelRGB operator*(const VoxelRGB &aa, const uint8_t &bb)