aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcathook <b01902109@csie.ntu.edu.tw>2014-06-01 14:05:53 +0800
committercathook <b01902109@csie.ntu.edu.tw>2014-06-01 14:05:53 +0800
commitb79c0cf74d85767908c9130609d8f4cfcb2859ab (patch)
tree039400723fb430aa7ecc84a8a2619aeac5bcd24b
parent9ec5d78f273d306fb8793e73bbb658097439dbe2 (diff)
downloadmeow-b79c0cf74d85767908c9130609d8f4cfcb2859ab.tar
meow-b79c0cf74d85767908c9130609d8f4cfcb2859ab.tar.gz
meow-b79c0cf74d85767908c9130609d8f4cfcb2859ab.tar.bz2
meow-b79c0cf74d85767908c9130609d8f4cfcb2859ab.tar.lz
meow-b79c0cf74d85767908c9130609d8f4cfcb2859ab.tar.xz
meow-b79c0cf74d85767908c9130609d8f4cfcb2859ab.tar.zst
meow-b79c0cf74d85767908c9130609d8f4cfcb2859ab.zip
rm colors/old_files
-rw-r--r--meowpp/colors/HSL.h68
-rw-r--r--meowpp/colors/HSV.h73
-rw-r--r--meowpp/colors/RGB.h77
-rw-r--r--meowpp/colors/YUV.h63
4 files changed, 0 insertions, 281 deletions
diff --git a/meowpp/colors/HSL.h b/meowpp/colors/HSL.h
deleted file mode 100644
index db31f0a..0000000
--- a/meowpp/colors/HSL.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef colors_HSL_H_
-#define colors_HSL_H_
-
-#include "RGB.h"
-#include "YUV.h"
-
-#include <cstdlib>
-
-namespace meow{
- template<class T>
- class HSL{
- protected:
- T hsl_[3];
- HSL();
- HSL(T const& h, T const& s, T const& l);
- HSL(T const* hsl);
- public:
- virtual ~HSL(){ }
- ///////////////// **# not force #** ////////////////
- virtual T hMax() const = 0;
- virtual T hMin() const = 0;
- virtual T sMax() const = 0;
- virtual T sMin() const = 0;
- virtual T lMax() const = 0;
- virtual T lMin() const = 0;
- /////////////////// **# access #** /////////////////
- T h() const;
- T s() const;
- T l() const;
- T hsl(size_t i) const;
- T lsh(size_t i) const;
- /////////////////// **# setting #** ////////////////
- T h(T const& val);
- T s(T const& val);
- T l(T const& val);
- T hsl(size_t i, T const& val);
- T lsh(size_t i, T const& val);
- };
-
- class HSLf: public HSL<double>{
- public:
- HSLf();
- ~HSLf();
- HSLf(double const&h,double const&s,double const&l);
- HSLf(double const* hsl);
- double hMin() const;
- double hMax() const;
- double sMin() const;
- double sMax() const;
- double lMin() const;
- double lMax() const;
- };
-
- template<class HSL_T1, class HSL_T2>
- inline void HSL_to_HSL(HSL<HSL_T1> const& a, HSL<HSL_T2>* b);
- template<class RGB_T, class HSL_T>
- inline void RGB_to_HSL(RGB<RGB_T> const& rgb, HSL<HSL_T>* hsl);
- template<class HSL_T, class RGB_T>
- inline void HSL_to_RGB(HSL<HSL_T> const& hsl, RGB<RGB_T>* rgb);
- template<class YUV_T, class HSL_T>
- inline void YUV_to_HSL(YUV<YUV_T> const& yuv, HSL<HSL_T>* hsl);
- template<class HSL_T, class YUV_T>
- inline void HSL_to_YUV(HSL<HSL_T> const& hsl, YUV<YUV_T>* yuv);
-}
-
-#include "HSL.hpp"
-
-#endif // colors_HSL_H_
diff --git a/meowpp/colors/HSV.h b/meowpp/colors/HSV.h
deleted file mode 100644
index fe3c70d..0000000
--- a/meowpp/colors/HSV.h
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef colors_HSV_H_
-#define colors_HSV_H_
-
-#include "RGB.h"
-#include "YUV.h"
-#include "HSL.h"
-
-#include <cstdlib>
-
-namespace meow{
- template<class T>
- class HSV{
- protected:
- T hsv_[3];
- HSV();
- HSV(T const& h, T const& s, T const& v);
- HSV(T const* hsv);
- public:
- virtual ~HSV(){ }
- ///////////////// **# not force #** ////////////////
- virtual T hMax() const = 0;
- virtual T hMin() const = 0;
- virtual T sMax() const = 0;
- virtual T sMin() const = 0;
- virtual T vMax() const = 0;
- virtual T vMin() const = 0;
- /////////////////// **# access #** /////////////////
- T h() const;
- T s() const;
- T v() const;
- T hsv(size_t i) const;
- T vsh(size_t i) const;
- /////////////////// **# setting #** ////////////////
- T h(T const& val);
- T s(T const& val);
- T v(T const& val);
- T hsv(size_t i, T const& val);
- T vsh(size_t i, T const& val);
- };
-
- class HSVf: public HSV<double>{
- public:
- HSVf();
- ~HSVf();
- HSVf(double const&h,double const&s,double const&v);
- HSVf(double const* hsv);
- double hMin() const;
- double hMax() const;
- double sMin() const;
- double sMax() const;
- double vMin() const;
- double vMax() const;
- };
-
- template<class HSV_T1, class HSV_T2>
- inline void HSV_to_HSV(HSV<HSV_T1> const& a, HSV<HSV_T2>* b);
- template<class RGB_T, class HSV_T>
- inline void RGB_to_HSV(RGB<RGB_T> const& rgb, HSV<HSV_T>* hsv);
- template<class HSV_T, class RGB_T>
- inline void HSV_to_RGB(HSV<HSV_T> const& hsv, RGB<RGB_T>* rgb);
- template<class YUV_T, class HSV_T>
- inline void YUV_to_HSV(YUV<YUV_T> const& yuv, HSV<HSV_T>* hsv);
- template<class HSV_T, class YUV_T>
- inline void HSV_to_YUV(HSV<HSV_T> const& hsv, YUV<YUV_T>* yuv);
- template<class HSL_T, class HSV_T>
- inline void HSL_to_HSV(HSL<HSL_T> const& hsl, HSV<HSV_T>* hsv);
- template<class HSV_T, class HSL_T>
- inline void HSV_to_HSL(HSV<HSV_T> const& hsv, HSL<HSL_T>* hsl);
-}
-
-#include "HSV.hpp"
-
-#endif // colors_HSV_H_
diff --git a/meowpp/colors/RGB.h b/meowpp/colors/RGB.h
deleted file mode 100644
index 803cdd9..0000000
--- a/meowpp/colors/RGB.h
+++ /dev/null
@@ -1,77 +0,0 @@
-#ifndef colors_RGB_H_
-#define colors_RGB_H_
-
-#include <cstdlib>
-#include "../math.h"
-#include "../geo/Vector3D.h"
-
-namespace meow{
- template<class T>
- class RGB{
- protected:
- T rgb_[3];
- RGB();
- RGB(T const& r, T const& g, T const& b);
- RGB(T const* rgb);
- public:
- virtual ~RGB() { }
- ///////////////// **# not force #** ////////////////
- virtual T rMax() const = 0;
- virtual T rMin() const = 0;
- virtual T gMax() const = 0;
- virtual T gMin() const = 0;
- virtual T bMax() const = 0;
- virtual T bMin() const = 0;
- /////////////////// **# access #** /////////////////
- T r() const;
- T g() const;
- T b() const;
- T rgb(size_t i) const;
- T bgr(size_t i) const;
- /////////////////// **# setting #** ////////////////
- T r(T const& val);
- T g(T const& val);
- T b(T const& val);
- T rgb(size_t i, T const& val);
- T bgr(size_t i, T const& val);
- T rgb(T const& __r, T const& __g, T const& __b);
- T bgr(T const& __r, T const& __g, T const& __b);
- Matrix <T> matrix() const;
- Vector3D<T> vector() const;
- };
-
- class RGBf: public RGB<double>{
- public:
- RGBf();
- RGBf(double const&r,double const&g,double const&b);
- RGBf(double const* rgb);
- ~RGBf();
- double rMin() const;
- double rMax() const;
- double gMin() const;
- double gMax() const;
- double bMin() const;
- double bMax() const;
- };
-
- class RGBi: public RGB<int32_t>{
- public:
- RGBi();
- RGBi(int32_t const&r,int32_t const&g,int32_t const&b);
- RGBi(int32_t const* rgb);
- ~RGBi();
- int32_t rMin() const;
- int32_t rMax() const;
- int32_t gMin() const;
- int32_t gMax() const;
- int32_t bMin() const;
- int32_t bMax() const;
- };
-
- template<class RGB_T1, class RGB_T2>
- inline void RGB_to_RGB(RGB<RGB_T1> const& a, RGB<RGB_T2>* b);
-}
-
-#include "RGB.hpp"
-
-#endif // colors_RGB_H_
diff --git a/meowpp/colors/YUV.h b/meowpp/colors/YUV.h
deleted file mode 100644
index 0b48375..0000000
--- a/meowpp/colors/YUV.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef colors_YUV_H_
-#define colors_YUV_H_
-
-#include "RGB.h"
-
-#include <cstdlib>
-
-namespace meow{
- template<class T>
- class YUV{
- protected:
- T yuv_[3];
- YUV();
- YUV(T const& y, T const& u, T const& v);
- YUV(T const* yuv);
- public:
- virtual ~YUV() { }
- ///////////////// **# not force #** ////////////////
- virtual T yMax() const = 0;
- virtual T yMin() const = 0;
- virtual T uMax() const = 0;
- virtual T uMin() const = 0;
- virtual T vMax() const = 0;
- virtual T vMin() const = 0;
- /////////////////// **# access #** /////////////////
- T y() const;
- T u() const;
- T v() const;
- T yuv(size_t i) const;
- T vuy(size_t i) const;
- /////////////////// **# setting #** ////////////////
- T y(T const& val);
- T u(T const& val);
- T v(T const& val);
- T yuv(size_t i, T const& val);
- T vuy(size_t i, T const& val);
- };
-
- class YUVf: public YUV<double>{
- public:
- YUVf();
- ~YUVf();
- YUVf(double const& y, double const& u, double const& v);
- YUVf(double const* yuv);
- double yMin() const;
- double yMax() const;
- double uMin() const;
- double uMax() const;
- double vMin() const;
- double vMax() const;
- };
-
- template<class YUV_T1, class YUV_T2>
- inline void YUV_to_YUV(YUV<YUV_T1> const& a, YUV<YUV_T2>* b);
- template<class RGB_T, class YUV_T>
- inline void RGB_to_YUV(RGB<RGB_T> const& rgb, YUV<YUV_T>* yuv);
- template<class YUV_T, class RGB_T>
- inline void YUV_to_RGB(YUV<YUV_T> const& yuv, RGB<RGB_T>* rgb);
-}
-
-#include "YUV.hpp"
-
-#endif // colors_YUV_H_