00001 00002 /* 00003 TEDDY - General graphics application library 00004 Copyright (C) 1999-2002 Timo Suoranta 00005 tksuoran@cc.helsinki.fi 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public 00009 License as published by the Free Software Foundation; either 00010 version 2.1 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library; if not, write to the Free Software 00019 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 00021 $Id: LWLight.h,v 1.1 2002/02/16 12:41:39 tksuoran Exp $ 00022 */ 00023 00024 00025 #include "Teddy/TeddyConfig.h" 00026 #if defined( TEDDY_INCLUDE_LW_SCENE ) 00027 00028 00029 #include "Teddy/Imports/LWInstance.h" 00030 #include "Teddy/Graphics/Color.h" 00031 #include "Teddy/Materials/Light.h" 00032 00033 00034 #ifndef TEDDY__IMPORTS__LW_LIGHT__H 00035 #define TEDDY__IMPORTS__LW_LIGHT__H 00036 00037 00038 namespace Teddy { 00039 namespace Imports { 00040 00041 00042 class LWMotion; 00043 00044 00045 class LWLight : public LWInstance { 00046 public: 00047 LWLight(); 00048 00049 void genLight (); 00050 void setColor ( float r, float g, float b ); 00051 00052 Teddy::Materials::Light *getLight(); 00053 void setColor ( double r, double g, double b ); 00054 void setType ( int type ); 00055 void setFalloffType ( int falloff_type ); 00056 void setRange ( double range ); 00057 void setConeAngle ( double cone_angle ); 00058 void setEdgeAngle ( double edge_angle ); 00059 void setIntensity ( double intensity ); 00060 void setFalloff ( double falloff ); 00061 void setAffectCaustics ( int affect_caustics ); 00062 void setAffectDiffuse ( int affect_diffuse ); 00063 void setAffectSpecular ( int affect_specular ); 00064 void setAffectOpenGL ( int affect_opengl ); 00065 void setUseConeAngle ( int select ); 00066 void setLensFlare ( int select ); 00067 void setFlareIntensity ( double flare_intensity ); 00068 void setFlareDissolve ( double flare_dissolve ); 00069 void setLensFlareFade ( int lens_flare_fade ); 00070 void setLensFlareOptions ( int lens_flare_options ); 00071 void setFlareRandStreakInt ( double flare_rand_streak_int ); 00072 void setFlareRandStreakDens ( double flare_rand_streak_dens ); 00073 void setFlareRandStreakSharp( double flare_rand_streak_sharp ); 00074 void setShadowType ( int shadow_type ); 00075 void setShadowCasting ( int shadow_casting ); 00076 void setShadowMapSize ( int shadow_map_size ); 00077 void setShadowMapAngle ( double shadow_map_angle ); 00078 void setShadowFuzziness ( double shadow_fuzziness ); 00079 00080 protected: 00081 Teddy::Graphics ::Color ambient_color; 00082 double amb_intensity; 00083 Teddy::Graphics ::Color color; 00084 Teddy::Materials::Light *light; 00085 int type ; 00086 int falloff_type ; 00087 double range ; 00088 double cone_angle ; 00089 double edge_angle ; 00090 double intensity ; 00091 double falloff ; 00092 int affect_caustics ; 00093 int affect_diffuse ; 00094 int affect_specular ; 00095 int affect_opengl ; 00096 int use_cone_angle ; 00097 int lens_flare ; 00098 double flare_intensity ; 00099 double flare_dissolve ; 00100 int lens_flare_fade ; 00101 int lens_flare_options ; 00102 double flare_rand_streak_int ; 00103 double flare_rand_streak_dens ; 00104 double flare_rand_streak_sharp; 00105 int shadow_type ; 00106 int shadow_casting ; 00107 int shadow_map_size ; 00108 double shadow_map_angle ; 00109 double shadow_fuzziness ; 00110 00111 00112 }; 00113 00114 00115 }; // namespace Imports 00116 }; // namespace Teddy 00117 00118 00119 #endif // TEDDY_INCLUDE_LW_SCENE 00120 #endif // TEDDY__IMPORTS__LW_LIGHT__H 00121 00122