This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
#include "gamegl.h"
#include "Quaternions.h"
-class Light{
+class Light
+{
public:
- GLint type;
- GLfloat color[3];
- GLfloat ambient[3];
- int attach;
- XYZ location;
+ GLint type;
+ GLfloat color[3];
+ GLfloat ambient[3];
+ int attach;
+ XYZ location;
+ inline void setColors(GLfloat cr, GLfloat cg, GLfloat cb,
+ GLfloat ar, GLfloat ag, GLfloat ab) {
+ color[0] = cr;
+ color[1] = cg;
+ color[2] = cb;
+ ambient[0] = ar;
+ ambient[1] = ag;
+ ambient[2] = ab;
+ }
};
void SetUpMainLight(Light* whichsource, int whichlight, float ambientr, float ambientg, float ambientb);