00001 #ifndef __VECMATH_COLOR3_HPP 00002 #define __VECMATH_COLOR3_HPP 00003 00004 #ifndef __VECMATH_TUPLE3_HPP 00005 #include <vecmath/_Tuple3.h> 00006 #endif 00007 00008 //#define DEBUGCOLOR3(d) d 00009 #define DEBUGCOLOR3(d) 00010 00011 template <class Type> 00012 class _Color3 : public _Tuple3<Type> { 00013 public: 00014 00015 _Color3<Type>() : _Tuple3<Type>() {} 00016 00017 explicit _Color3<Type>(Type x, Type y = 0, Type z = 0) : _Tuple3<Type>(x, y, z) { 00018 DEBUGCOLOR3(cout << "_Color3 explicit constructor x y z" << *this << endl); 00019 } 00020 00021 _Color3<Type> (const _Color3<byte>& t) : _Tuple3<Type>(t) { 00022 DEBUGCOLOR3(cout << "_Color3 constructor &byte " << *this << endl); 00023 } 00024 00025 // prevent unwanted constructions!!! 00026 _Color3<Type> (const _Tuple3<double>& t) : _Tuple3<Type>(t) { 00027 DEBUGCOLOR3(cout << "_Color3 constructor &double " << *this << endl); 00028 } 00029 00030 _Color3<Type> (const _Tuple3<float>& t) : _Tuple3<Type>(t) { 00031 DEBUGCOLOR3(cout << "_Color3 constructor &float " << *this << endl); 00032 } 00033 00034 _Color3<Type> (const Type t[3]) : _Tuple3<Type>(t) { 00035 DEBUGCOLOR3(cout << "_Color3 constructor t[3] " << *this << endl); 00036 } 00037 }; 00038 00039 #endif