// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//

BALL_INLINE 
void ColorHSV::setHue(const ColorUnitHue& hue)
{
  hue_ = hue;
}

BALL_INLINE 
ColorUnitHue& ColorHSV::getHue()
{
  return hue_;
}

BALL_INLINE 
const ColorUnitHue& ColorHSV::getHue() const
{
  return hue_;
}

BALL_INLINE 
void ColorHSV::setSaturation(const ColorUnit& saturation)
{
  saturation_ = saturation;
}

BALL_INLINE 
ColorUnit& ColorHSV::getSaturation()
{
  return saturation_;
}

BALL_INLINE 
const ColorUnit& 
ColorHSV::getSaturation() const
{
  return saturation_;
}

BALL_INLINE 
void ColorHSV::setValue(const ColorUnit& value)
{
  value_ = value;
}

BALL_INLINE 
ColorUnit& ColorHSV::getValue()
{
  return value_;
}

BALL_INLINE 
const ColorUnit& ColorHSV::getValue() const
{
  return value_;
}

BALL_INLINE 
void ColorHSV::set
  (const ColorUnitHue& hue,
   const ColorUnit& saturation,
   const ColorUnit& value)
{
  hue_				= hue;
  saturation_ = saturation;
  value_      = value;
}

BALL_INLINE 
void ColorHSV::get
  (ColorUnitHue& hue,
   ColorUnit& saturation,
   ColorUnit& value) const
{
  hue					= hue_;
  saturation	= saturation_;
  value				= value_;
}

BALL_INLINE 
bool ColorHSV::operator == (const ColorHSV& color) const
{
  return (bool)(hue_ == color.hue_
								&& saturation_ == color.saturation_
								&& value_ == color.value_);
}

BALL_INLINE 
bool ColorHSV::operator != (const ColorHSV& color) const
{
  return (bool)!(this->operator==(color));
}

BALL_INLINE 
bool ColorHSV::operator < (const ColorHSV& color) const
{
  return (bool)(hue_ < color.hue_
								&& saturation_ < color.saturation_
								&& value_ < color.value_);
}

BALL_INLINE 
bool ColorHSV::operator > (const ColorHSV &color) const
{
  return (bool)(hue_ > color.hue_
								&& saturation_ > color.saturation_
								&& value_ > color.value_);
}

BALL_INLINE 
bool ColorHSV::operator <= (const ColorHSV &color) const
{
  return (bool)!(this->operator>(color));
}

BALL_INLINE 
bool ColorHSV::operator >= (const ColorHSV &color) const
{
  return (bool)!(this->operator<(color));  
}
