Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GRLight.h

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;      ///<    ŠgŽUŒõ
00012     Vec4f specular;     ///<    
00013     Vec4f ambient;
00014     Vec4f position;     ///<    ŒõŒ¹‚̈ʒuCw=0‚Æ‚·‚邯–³ŒÀ‰“(•ûŒüŒõŒ¹)‚ɂȂéD
00015     float range;        ///<    Œõ‚ª“Í‚­”͈Í
00016     ///@name    Œ¸Š—¦DAtten = 1/( att0 + att1 * d + att2 * d^2)
00017     //@{
00018     float attenuation0; ///<    att0    0..‡
00019     float attenuation1; ///<    att1    0..‡
00020     float attenuation2; ///<    att2    0..‡
00021     //@}
00022     Vec3f spotDirection;///<    ƒXƒ|ƒbƒgƒ‰ƒCƒg‚̏ꍇ‚ÌŒü‚«
00023     float spotFalloff;  ///<    Œ¸Š‚Ì‘‚³(‘å‚«‚¢‚Ù‚Ç‹}s)      0..‡
00024     float spotInner;    ///<    ƒXƒ|ƒbƒgƒ‰ƒCƒg‚Ì’†S•”•ª        0..spotCutoff
00025     float spotCutoff;   ///<    ƒXƒ|ƒbƒgƒ‰ƒCƒg‚ÌŒõ‚ª“–‚½‚é”ÍˆÍ  0..ƒÎ
00026     GRLightData();
00027 };
00028 ///
00029 class SPR_DLL GRLight:public GRVisual, public GRLightData{
00030 public:
00031     SGOBJECTDEF(GRLight);
00032     /// Žp¨ƒtƒŒ[ƒ€
00033     UTRef<SGFrame> frPosture;
00034     /// ƒ[ƒhŒã‚ɌĂяo‚³‚ê‚é
00035     virtual void Loaded(SGScene* scene);
00036     /// ƒŒƒ“ƒ_ƒŠƒ“ƒO
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 }   //  Spr
00049 #endif

Generated on Sun Apr 16 02:07:08 2006 for Springhead by  doxygen 1.4.1