User manual:   Main Page   Overview   Installation   User Interface   Tutorial   Example   FAQ   Version Updates
Reference manual:   Class List   Class Members   Globals, enums and defines

color.h

Go to the documentation of this file.
00001 // color.h
00002 
00003 #ifndef COLOR_H
00004 #define COLOR_H
00005 
00006 #include <stdlib.h>
00007 #include <gl/glaux.h>
00008 #include "params.h"
00009 
00014 class Color {
00015 
00016 public:
00017         
00019         Color();
00025         Color(double r, double g, double b); 
00029         Color(COLORREF color);
00030 
00036         void setColor(double r, double g, double b);
00037 
00042         double& operator[](COLOR col);
00047         double operator[](COLOR col) const;
00048 
00053         Color& operator=(const Color &color);
00054 
00059         Color& operator +=(const Color &color);
00064         Color& operator -=(const Color &color);
00069         Color operator +(const Color &color) const;
00074         Color operator -(const Color &color) const;
00078         Color operator -() const;
00079 
00084         Color& operator *=(double d);
00089         Color& operator /=(double d);
00094         Color operator *(double d) const;
00099         Color operator /(double d) const;
00105         bool operator ==(const Color &color) const;
00106 
00110         double abs() const;
00112         void setRandomColor();
00113 
00114 private:
00115         double rgb[3];
00116         void checkOverflow();
00117 };
00118 
00119 #endif

MeshMaker 5.2 Manual
This software library was written by Roni Raab, ronir@cs.technion.ac.il.
Last updated on May 2003.
This software is for academic and research use only.