メインページ | ネームスペース一覧 | クラス階層 | 構成 | Directories | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ | 関連ページ

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;      ///<    拡散光
00012     Vec4f specular;     ///<    
00013     Vec4f ambient;
00014     Vec4f position;     ///<    光源の位置,w=0とすると無限遠(方向光源)になる.
00015     float range;        ///<    光が届く範囲
00016     ///@name    減衰率.Atten = 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;///<    スポットライトの場合の向き
00023     float spotFalloff;  ///<    減衰の早さ(大きいほど急峻)      0..∞
00024     float spotInner;    ///<    スポットライトの中心部分        0..spotCutoff
00025     float spotCutoff;   ///<    スポットライトの光が当たる範囲  0..π
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 }   //  Spr
00049 #endif

Springheadに対してSun Apr 16 01:57:52 2006に生成されました。  doxygen 1.4.1