34 #ifndef CARTOBASE_TYPE_HSV_H 
   35 #define CARTOBASE_TYPE_HSV_H 
   42 #ifdef CARTO_DEBUG_RGB 
   75                 const uint8_t &v = 0 );
 
  104       inline const uint8_t& 
hue        ()
 const { 
return (*
this)[0]; }
 
  105       inline const uint8_t& 
saturation ()
 const { 
return (*
this)[1]; }
 
  106       inline const uint8_t& 
value      ()
 const { 
return (*
this)[2]; }
 
  107       inline       uint8_t& 
hue        ()       { 
return (*
this)[0]; }
 
  109       inline       uint8_t& 
value      ()       { 
return (*
this)[2]; }
 
  112   VoxelHSV 
operator + (
const VoxelHSV &aa, 
const VoxelHSV &bb);
 
  113   VoxelHSV 
operator + (
const VoxelHSV &aa, 
const uint8_t  &bb);
 
  114   VoxelHSV 
operator + (
const uint8_t  &aa, 
const VoxelHSV &bb);
 
  115   VoxelHSV 
operator - (
const VoxelHSV &aa, 
const VoxelHSV &bb);
 
  116   VoxelHSV 
operator - (
const VoxelHSV &aa, 
const uint8_t  &bb);
 
  117   VoxelHSV 
operator - (
const uint8_t  &aa, 
const VoxelHSV &bb);
 
  118   VoxelHSV 
operator * (
const VoxelHSV &aa, 
const uint8_t  &bb);
 
  119   VoxelHSV 
operator * (
const VoxelHSV &aa, 
const uint16_t &bb);
 
  120   VoxelHSV 
operator * (
const VoxelHSV &aa, 
const uint32_t &bb);
 
  121   VoxelHSV 
operator * (
const VoxelHSV &aa, 
const uint64_t &bb);
 
  122   VoxelHSV 
operator * (
const VoxelHSV &aa, 
const float    &bb);
 
  123   VoxelHSV 
operator * (
const VoxelHSV &aa, 
const double   &bb);
 
  124   VoxelHSV 
operator * (
const uint8_t  &aa, 
const VoxelHSV &bb);
 
  125   VoxelHSV 
operator * (
const uint16_t &aa, 
const VoxelHSV &bb);
 
  126   VoxelHSV 
operator * (
const uint32_t &aa, 
const VoxelHSV &bb);
 
  127   VoxelHSV 
operator * (
const uint64_t &aa, 
const VoxelHSV &bb);
 
  128   VoxelHSV 
operator * (
const float    &aa, 
const VoxelHSV &bb);
 
  129   VoxelHSV 
operator * (
const double   &aa, 
const VoxelHSV &bb);
 
  130   VoxelHSV 
operator / (
const VoxelHSV &aa, 
const uint8_t  &bb);
 
  131   VoxelHSV 
operator / (
const VoxelHSV &aa, 
const uint16_t &bb);
 
  132   VoxelHSV 
operator / (
const VoxelHSV &aa, 
const uint32_t &bb);
 
  133   VoxelHSV 
operator / (
const VoxelHSV &aa, 
const uint64_t &bb);
 
  134   VoxelHSV 
operator / (
const VoxelHSV &aa, 
const float    &bb);
 
  135   VoxelHSV 
operator / (
const VoxelHSV &aa, 
const double   &bb);
 
  137   VoxelHSV 
operator * (
const VoxelHSV &aa, 
const long     &bb);
 
  138   VoxelHSV 
operator * (
const long     &aa, 
const VoxelHSV &bb);
 
  139   VoxelHSV 
operator / (
const VoxelHSV &aa, 
const long     &bb);
 
  151     #ifdef CARTO_DEBUG_RGB 
  152       std::cout << 
"HSV:: Constructor( HSV )" << std::endl;
 
  160     #ifdef CARTO_DEBUG_RGB 
  161       std::cout << 
"HSV:: Constructor( VV<3> )" << std::endl;
 
  168     #ifdef CARTO_DEBUG_RGB 
  169       std::cout << 
"HSV:: Constructor( h,s,v )" << std::endl;
 
  179     #ifdef CARTO_DEBUG_RGB 
  180       std::cout << 
"HSV:: Destructor" << std::endl;
 
  189     #ifdef CARTO_DEBUG_RGB 
  190       std::cout << 
"HSV:: operator = ( HSV )" << std::endl;
 
  201     #ifdef CARTO_DEBUG_RGB 
  202       std::cout << 
"HSV:: operator = ( uint8_t )" << std::endl;
 
  215     #ifdef CARTO_DEBUG_RGB 
  216       std::cout << 
"HSV:: operator += ( HSV )" << std::endl;
 
  227     #ifdef CARTO_DEBUG_RGB 
  228       std::cout << 
"HSV:: operator -= ( HSV )" << std::endl;
 
  239     #ifdef CARTO_DEBUG_RGB 
  240       std::cout << 
"HSV:: operator += ( uint8_t )" << std::endl;
 
  251     #ifdef CARTO_DEBUG_RGB 
  252       std::cout << 
"HSV:: operator -= ( uint8_t )" << std::endl;
 
  263     #ifdef CARTO_DEBUG_RGB 
  264       std::cout << 
"HSV:: operator *= ( uint8_t )" << std::endl;
 
  266     hue()        *= 
static_cast<uint8_t
>( val );
 
  268     value()      *= 
static_cast<uint8_t
>( val );
 
  275     #ifdef CARTO_DEBUG_RGB 
  276       std::cout << 
"HSV:: operator *= ( uint16_t )" << std::endl;
 
  278     hue()        *= 
static_cast<uint8_t
>( val );
 
  280     value()      *= 
static_cast<uint8_t
>( val );
 
  287     #ifdef CARTO_DEBUG_RGB 
  288       std::cout << 
"HSV:: operator *= ( uint32_t )" << std::endl;
 
  290     hue()        *= 
static_cast<uint8_t
>( val );
 
  292     value()      *= 
static_cast<uint8_t
>( val );
 
  299     #ifdef CARTO_DEBUG_RGB 
  300       std::cout << 
"HSV:: operator *= ( uint64_t )" << std::endl;
 
  302     hue()        *= 
static_cast<uint8_t
>( val );
 
  304     value()      *= 
static_cast<uint8_t
>( val );
 
  311     #ifdef CARTO_DEBUG_RGB 
  312       std::cout << 
"HSV:: operator *= ( float )" << std::endl;
 
  314     hue()        *= 
static_cast<uint8_t
>( val );
 
  316     value()      *= 
static_cast<uint8_t
>( val );
 
  323     #ifdef CARTO_DEBUG_RGB 
  324       std::cout << 
"HSV:: operator *= ( double )" << std::endl;
 
  326     hue()        *= 
static_cast<uint8_t
>( val );
 
  328     value()      *= 
static_cast<uint8_t
>( val );
 
  335     #ifdef CARTO_DEBUG_RGB 
  336       std::cout << 
"HSV:: operator /= ( uint8_t )" << std::endl;
 
  339     hue()        /= 
static_cast<uint8_t
>( val );
 
  341     value()      /= 
static_cast<uint8_t
>( val );
 
  348     #ifdef CARTO_DEBUG_RGB 
  349       std::cout << 
"HSV:: operator /= ( uint16_t )" << std::endl;
 
  352     hue()        /= 
static_cast<uint8_t
>( val );
 
  354     value()      /= 
static_cast<uint8_t
>( val );
 
  361     #ifdef CARTO_DEBUG_RGB 
  362       std::cout << 
"HSV:: operator /= ( uint32_t )" << std::endl;
 
  365     hue()        /= 
static_cast<uint8_t
>( val );
 
  367     value()      /= 
static_cast<uint8_t
>( val );
 
  374     #ifdef CARTO_DEBUG_RGB 
  375       std::cout << 
"HSV:: operator /= ( uint64_t )" << std::endl;
 
  378     hue()        /= 
static_cast<uint8_t
>( val );
 
  380     value()      /= 
static_cast<uint8_t
>( val );
 
  387     #ifdef CARTO_DEBUG_RGB 
  388       std::cout << 
"HSV:: operator /= ( float )" << std::endl;
 
  391     hue()        /= 
static_cast<uint8_t
>( val );
 
  393     value()      /= 
static_cast<uint8_t
>( val );
 
  400     #ifdef CARTO_DEBUG_RGB 
  401       std::cout << 
"HSV:: operator /= ( double )" << std::endl;
 
  404     hue()        /= 
static_cast<uint8_t
>( val );
 
  406     value()      /= 
static_cast<uint8_t
>( val );
 
  415     #ifdef CARTO_DEBUG_RGB 
  416       std::cout << 
"HSV:: HSV + HSV" << std::endl;
 
  425     #ifdef CARTO_DEBUG_RGB 
  426       std::cout << 
"HSV:: HSV + uint8_t" << std::endl;
 
  435     #ifdef CARTO_DEBUG_RGB 
  436       std::cout << 
"HSV:: HSV + uint16_t" << std::endl;
 
  445     #ifdef CARTO_DEBUG_RGB 
  446       std::cout << 
"HSV:: HSV + uint32_t" << std::endl;
 
  455     #ifdef CARTO_DEBUG_RGB 
  456       std::cout << 
"HSV:: HSV + uint64_t" << std::endl;
 
  465     #ifdef CARTO_DEBUG_RGB 
  466       std::cout << 
"HSV:: HSV + float" << std::endl;
 
  469     return result += 
static_cast<uint8_t
>(bb);
 
  475     #ifdef CARTO_DEBUG_RGB 
  476       std::cout << 
"HSV:: HSV + double" << std::endl;
 
  479     return result += 
static_cast<uint8_t
>(bb);
 
  485     #ifdef CARTO_DEBUG_RGB 
  486       std::cout << 
"HSV:: uint8_t + HSV" << std::endl;
 
  495     #ifdef CARTO_DEBUG_RGB 
  496       std::cout << 
"HSV:: uint16_t + HSV" << std::endl;
 
  505     #ifdef CARTO_DEBUG_RGB 
  506       std::cout << 
"HSV:: uint32_t + HSV" << std::endl;
 
  515     #ifdef CARTO_DEBUG_RGB 
  516       std::cout << 
"HSV:: uint64_t + HSV" << std::endl;
 
  525     #ifdef CARTO_DEBUG_RGB 
  526       std::cout << 
"HSV:: float + HSV" << std::endl;
 
  528     VoxelHSV result( 
static_cast<uint8_t
>(aa) );
 
  535     #ifdef CARTO_DEBUG_RGB 
  536       std::cout << 
"HSV:: double + HSV" << std::endl;
 
  538     VoxelHSV result( 
static_cast<uint8_t
>(aa) );
 
  545     #ifdef CARTO_DEBUG_RGB 
  546       std::cout << 
"HSV:: HSV - HSV" << std::endl;
 
  555     #ifdef CARTO_DEBUG_RGB 
  556       std::cout << 
"HSV:: HSV - uint8_t" << std::endl;
 
  565     #ifdef CARTO_DEBUG_RGB 
  566       std::cout << 
"HSV:: HSV - uint16_t" << std::endl;
 
  575     #ifdef CARTO_DEBUG_RGB 
  576       std::cout << 
"HSV:: HSV - uint32_t" << std::endl;
 
  585     #ifdef CARTO_DEBUG_RGB 
  586       std::cout << 
"HSV:: HSV - uint64_t" << std::endl;
 
  595     #ifdef CARTO_DEBUG_RGB 
  596       std::cout << 
"HSV:: HSV - float" << std::endl;
 
  599     return result -= 
static_cast<uint8_t
>(bb);
 
  605     #ifdef CARTO_DEBUG_RGB 
  606       std::cout << 
"HSV:: HSV - double" << std::endl;
 
  609     return result -= 
static_cast<uint8_t
>(bb);
 
  615     #ifdef CARTO_DEBUG_RGB 
  616       std::cout << 
"HSV:: uint8_t - HSV" << std::endl;
 
  625     #ifdef CARTO_DEBUG_RGB 
  626       std::cout << 
"HSV:: uint16_t - HSV" << std::endl;
 
  635     #ifdef CARTO_DEBUG_RGB 
  636       std::cout << 
"HSV:: uint32_t - HSV" << std::endl;
 
  645     #ifdef CARTO_DEBUG_RGB 
  646       std::cout << 
"HSV:: uint64_t - HSV" << std::endl;
 
  655     #ifdef CARTO_DEBUG_RGB 
  656       std::cout << 
"HSV:: float - HSV" << std::endl;
 
  658     VoxelHSV result( 
static_cast<uint8_t
>(aa) );
 
  665     #ifdef CARTO_DEBUG_RGB 
  666       std::cout << 
"HSV:: double - HSV" << std::endl;
 
  668     VoxelHSV result( 
static_cast<uint8_t
>(aa) );
 
  675     #ifdef CARTO_DEBUG_RGB 
  676       std::cout << 
"HSV:: HSV * uint8_t" << std::endl;
 
  685     #ifdef CARTO_DEBUG_RGB 
  686       std::cout << 
"HSV:: HSV * uint16_t" << std::endl;
 
  695     #ifdef CARTO_DEBUG_RGB 
  696       std::cout << 
"HSV:: HSV * uint32_t" << std::endl;
 
  705     #ifdef CARTO_DEBUG_RGB 
  706       std::cout << 
"HSV:: HSV * uint64_t" << std::endl;
 
  715     #ifdef CARTO_DEBUG_RGB 
  716       std::cout << 
"HSV:: HSV * float" << std::endl;
 
  725     #ifdef CARTO_DEBUG_RGB 
  726       std::cout << 
"HSV:: HSV * double" << std::endl;
 
  735     #ifdef CARTO_DEBUG_RGB 
  736       std::cout << 
"HSV:: uint8_t * HSV" << std::endl;
 
  745     #ifdef CARTO_DEBUG_RGB 
  746       std::cout << 
"HSV:: uint16_t * HSV" << std::endl;
 
  755     #ifdef CARTO_DEBUG_RGB 
  756       std::cout << 
"HSV:: uint32_t * HSV" << std::endl;
 
  765     #ifdef CARTO_DEBUG_RGB 
  766       std::cout << 
"HSV:: uint64_t * HSV" << std::endl;
 
  775     #ifdef CARTO_DEBUG_RGB 
  776       std::cout << 
"HSV:: float * HSV" << std::endl;
 
  785     #ifdef CARTO_DEBUG_RGB 
  786       std::cout << 
"HSV:: double * HSV" << std::endl;
 
  795     #ifdef CARTO_DEBUG_RGB 
  796       std::cout << 
"HSV:: HSV / uint8_t" << std::endl;
 
  805     #ifdef CARTO_DEBUG_RGB 
  806       std::cout << 
"HSV:: HSV / uint16_t" << std::endl;
 
  815     #ifdef CARTO_DEBUG_RGB 
  816       std::cout << 
"HSV:: HSV / uint32_t" << std::endl;
 
  825     #ifdef CARTO_DEBUG_RGB 
  826       std::cout << 
"HSV:: HSV / uint64_t" << std::endl;
 
  835     #ifdef CARTO_DEBUG_RGB 
  836       std::cout << 
"HSV:: HSV / float" << std::endl;
 
  845     #ifdef CARTO_DEBUG_RGB 
  846       std::cout << 
"HSV:: HSV / double" << std::endl;
 
  857     #ifdef CARTO_DEBUG_RGB 
  858       std::cout << 
"HSV:: operator *= ( long )" << std::endl;
 
  860     hue()        *= 
static_cast<uint8_t
>( val );
 
  862     value()      *= 
static_cast<uint8_t
>( val );
 
  869     #ifdef CARTO_DEBUG_RGB 
  870       std::cout << 
"HSV:: operator /= ( long )" << std::endl;
 
  873     hue()        /= 
static_cast<uint8_t
>( val );
 
  875     value()      /= 
static_cast<uint8_t
>( val );
 
  882     #ifdef CARTO_DEBUG_RGB 
  883       std::cout << 
"HSV:: HSV * long" << std::endl;
 
  892     #ifdef CARTO_DEBUG_RGB 
  893       std::cout << 
"HSV:: long * HSV" << std::endl;
 
  902     #ifdef CARTO_DEBUG_RGB 
  903       std::cout << 
"HSV:: HSV / long" << std::endl;
 
static std::string dataType()
VoxelHSV & operator=(const VoxelHSV &other)
const uint8_t & hue() const
const uint8_t & saturation() const
VoxelHSV & operator/=(const uint8_t &val)
VoxelHSV & operator+=(const VoxelHSV &other)
VoxelHSV & operator-=(const VoxelHSV &other)
VoxelHSV & operator*=(const uint8_t &val)
const uint8_t & value() const
VoxelHSV(const VoxelHSV &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)