|
|
|
|
@ -247,6 +247,21 @@ range @f$ [0.0, 1.0] @f$.
|
|
|
|
|
impossible to explicitly instantiate */ |
|
|
|
|
template<class T> class Color3: public Vector3<T> { |
|
|
|
|
public: |
|
|
|
|
/**
|
|
|
|
|
* @brief Corresponding floating-point type |
|
|
|
|
* |
|
|
|
|
* For HSV and other color spaces. |
|
|
|
|
*/ |
|
|
|
|
typedef typename TypeTraits<T>::FloatingPointType FloatingPointType; |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Type for storing HSV color space values |
|
|
|
|
* |
|
|
|
|
* Hue in range @f$ [0.0, 360.0] @f$, saturation and value in range |
|
|
|
|
* @f$ [0.0, 1.0] @f$. |
|
|
|
|
*/ |
|
|
|
|
typedef std::tuple<Deg<FloatingPointType>, FloatingPointType, FloatingPointType> Hsv; |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Red color |
|
|
|
|
* |
|
|
|
|
@ -313,21 +328,6 @@ template<class T> class Color3: public Vector3<T> {
|
|
|
|
|
return {Implementation::fullChannel<T>(), Implementation::fullChannel<T>(), blue}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Corresponding floating-point type |
|
|
|
|
* |
|
|
|
|
* For HSV and other color spaces. |
|
|
|
|
*/ |
|
|
|
|
typedef typename TypeTraits<T>::FloatingPointType FloatingPointType; |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Type for storing HSV color space values |
|
|
|
|
* |
|
|
|
|
* Hue in range @f$ [0.0, 360.0] @f$, saturation and value in range |
|
|
|
|
* @f$ [0.0, 1.0] @f$. |
|
|
|
|
*/ |
|
|
|
|
typedef std::tuple<Deg<FloatingPointType>, FloatingPointType, FloatingPointType> Hsv; |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Create RGB color from HSV representation |
|
|
|
|
* @param hsv Color in HSV color space |
|
|
|
|
|