00001 #ifndef GRLight_H
00002 #define GRLight_H
00003
00004 #include <SceneGraph/SGFrame.h>
00005 #include <Graphics/GRVisual.h>
00006 #include <WinBasis/WBUtility.h>
00007
00008 namespace Spr {;
00009
00010 struct GRLightData{
00011 Vec4f diffuse;
00012 Vec4f specular;
00013 Vec4f ambient;
00014 Vec4f position;
00015 float range;
00016
00017
00018 float attenuation0;
00019 float attenuation1;
00020 float attenuation2;
00021
00022 Vec3f spotDirection;
00023 float spotFalloff;
00024 float spotInner;
00025 float spotCutoff;
00026 GRLightData();
00027 };
00028
00029 class SPR_DLL GRLight:public GRVisual, public GRLightData{
00030 public:
00031 SGOBJECTDEF(GRLight);
00032
00033 UTRef<SGFrame> frPosture;
00034
00035 virtual void Loaded(SGScene* scene);
00036
00037 virtual void Render(SGFrame* n, GRRender* render);
00038 virtual void Rendered(SGFrame* n, GRRender* render);
00039
00040 virtual bool AddChildObject(SGObject* obj, SGScene* s);
00041 virtual size_t NReferenceObjects();
00042 virtual SGObject* ReferenceObject(size_t i);
00043
00044 };
00045
00046
00047
00048 }
00049 #endif