[AE Engine logo] Public API Reference
Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

color3.h

00001 /*
00002  *  AE Engine
00003  *
00004  *  Copyright (C) 2003 Riku "Rakkis" Nurminen
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef __AELIB_AEGFX_COLOR3_H__
00023 #define __AELIB_AEGFX_COLOR3_H__
00024 
00025 #define ONLY_INCLUDE_STD
00026 #include <aedefs.h>
00027 #undef ONLY_INCLUDE_STD
00028 
00033 class aeColor3 {
00034         AECF_CNDEF
00035 
00036  public:
00041         aeColor3();
00042         aeColor3(float r, float g, float b);
00050         ~aeColor3();
00051 
00053         float red;
00055         float green;
00057         float blue;
00058 
00066         void set(float r, float g, float b);
00067 
00075         void clamp(float r, float g, float b);
00076 
00081         void clampDown();
00082 
00090         void add(float r, float g, float b);
00091 
00099         void subtract(float r, float g, float b);
00100 
00101         aeColor3 operator=(aeColor3 c) {
00102                 return aeColor3(red = c.red, green = c.green, blue = c.blue);
00103         }
00104 
00105         aeColor3 operator+(aeColor3 c) {
00106                 return aeColor3(red + c.red, green + c.green, blue + c.blue);
00107         }
00108 
00109         aeColor3 operator-(aeColor3 c) {
00110                 return aeColor3(red - c.red, green - c.green, blue - c.blue);
00111         }
00112     
00113         aeColor3 operator*(float num) {
00114                 return aeColor3(red * num, green * num, blue * num);
00115         }
00116 };
00117 
00118 #endif // __AELIB_AEGFX_COLOR3_H__

AE Engine Public API Reference
Generated on Wed Apr 9 09:43:39 2003 by Doxygen.