00001
00002 #ifndef RC_LIGHT_H
00003 #define RC_LIGHT_H
00004
00008 class Light : public Transformable {
00009 friend class SceneGraph;
00010 friend class Geometry;
00011
00012
00013
00014 protected:
00015 Light(
00016 const char *nname
00017 );
00018
00019 Light(
00020 const char *nname,
00021 vec3f ncolor,
00022 f32 nintensity,
00023 f32 falloff_radius
00024 );
00025
00026 ~Light();
00027
00028 public:
00029 static void registerCommands();
00030
00031 void setColor(
00032 vec3f ncolor
00033 );
00034
00035 void setColor(
00036 f32 r,
00037 f32 g,
00038 f32 b
00039 );
00040
00041 void setIntensity(
00042 f32 nintensity
00043 );
00044
00045 void setFalloff(
00046 f32 nfalloff
00047 );
00048
00049 vec3f getColor();
00050
00051 f32 getIntensity();
00052
00053 f32 getFalloff();
00054
00059 void toggleIndicator(
00060 bool visible
00061 );
00062
00063 bool getIndicator();
00064
00065 void logInfo();
00066
00067 private:
00068
00069 Node *duplicateSelf();
00070
00071 void drawSelf();
00072
00073
00074
00075 public:
00076 vec3f color;
00077 f32 intensity;
00078
00079 Sphere falloff;
00080
00081 private:
00082 bool indicatorVisible;
00083
00084 };
00085
00086
00087 #endif
00088