00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef ArmageTron_tCOLOR_H
00029 #define ArmageTron_tCOLOR_H
00030
00031 #include "defs.h"
00032
00034 struct tColor
00035 {
00036 public:
00037 tColor():r_(1), g_(1), b_(1), a_(1) {}
00038 tColor( REAL r, REAL g, REAL b, REAL a = 1 )
00039 :r_(r), g_(g), b_(b), a_(a) {}
00040 ~tColor(){}
00041
00042
00043 REAL r_, g_, b_, a_;
00044
00045 protected:
00046 private:
00047 };
00048
00049 inline std::ostream &operator<< (std::ostream &s,const tColor &c){
00050 s << "color(" << c.r_ << "," << c.g_ << "," << c.b_ << "," << c.a_ << ")";
00051 return s;
00052 }
00053
00054 inline bool operator==(const tColor &lColor, const tColor &rColor) {
00055 return ( (lColor.r_ == rColor.r_) && (lColor.g_ == rColor.g_) && (lColor.b_ == rColor.b_) && (lColor.a_ == rColor.a_));
00056 }
00057
00058 inline bool operator!=(const tColor &lColor, const tColor &rColor) {
00059 return !operator==(lColor, rColor);
00060 }
00061
00062 #endif
00063