00001 00002 // lighting.h // 00003 // ------------ // 00004 // begin : Thu Sep 11 2003 // 00005 // copyright : (C) 2003 by cbaudry (CEA/DSM/SPP) // 00006 // email : cedric.baudry@tremplin-utc.fr // 00008 00010 // // 00011 // This program is free software; you can redistribute it and/or modify // 00012 // it under the terms of the GNU General Public License as published by // 00013 // the Free Software Foundation, version 2 of the License // 00014 // // 00016 00017 #pragma once 00018 00019 #include <GL/gl.h> 00020 #include "structure.h" 00021 00028 class Lighting 00029 { 00030 00031 public : 00032 00033 Lighting(); 00034 00035 GLfloat ambient[4] ; 00036 GLfloat diffuse[4] ; 00037 GLfloat specular[4]; 00038 GLfloat posSpot1[4]; 00039 GLfloat posSpot2[4]; 00040 GLfloat direction[3]; 00041 00042 int enabled; 00043 int cutoff; 00044 int exponent; 00045 int bLocalViewer; 00046 int drawSmooth; 00047 00048 00049 void loadConfigData(void); 00050 void specifyLighting (void); 00051 00052 void drawSpots (void); 00053 void drawSpot(GLfloat x,GLfloat y,GLfloat z); 00054 00055 float norm (vec4f v); 00056 void vectorialProd (vec4f u, vec4f v, vec4f w); 00057 void computeNormals (SCENE * scene); 00058 00059 }; 00060