Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

InformationRenderer.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 // Lamp : Open source game middleware
00003 // Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //------------------------------------------------------------------------------
00019 
00020 /** @file
00021  * インフォメーションレンダラヘッダ
00022  * @author Junpee
00023  */
00024 
00025 #ifndef INFORMATION_RENDERER_H_
00026 #define INFORMATION_RENDERER_H_
00027 
00028 #include <Core/Container/ArrayList.h>
00029 
00030 namespace Lamp{
00031 
00032 class PrimitiveRenderer;
00033 class Scene;
00034 class Camera;
00035 class Mesh;
00036 
00037 //------------------------------------------------------------------------------
00038 /**
00039  * インフォメーションレンダラ
00040  */
00041 class InformationRenderer{
00042 public:
00043     //--------------------------------------------------------------------------
00044     // 生成、破棄
00045     //--------------------------------------------------------------------------
00046     /**
00047      * コンストラクタ
00048      */
00049     InformationRenderer();
00050 
00051     /**
00052      * デストラクタ
00053      */
00054     virtual ~InformationRenderer();
00055 
00056     //--------------------------------------------------------------------------
00057     // レンダリング
00058     //--------------------------------------------------------------------------
00059     /**
00060      * レンダリング準備を行う
00061      * @param scene レンダリングを行うシーン
00062      */
00063     virtual void renderingSetup(Scene* scene);
00064 
00065     /**
00066      * レンダリングを行う
00067      */
00068     virtual void rendering();
00069 
00070     //--------------------------------------------------------------------------
00071     // 描画フラグ
00072     //--------------------------------------------------------------------------
00073     /**
00074      * グリッドの描画フラグ設定
00075      * @param isDrawnGrid グリッドを描画するならtrue
00076      */
00077     virtual void setDrawnGrid(bool isDrawnGrid){ isDrawnGrid_ = isDrawnGrid; }
00078 
00079     /**
00080      * グリッドを描画するか
00081      * @return グリッドを描画するならtrue
00082      */
00083     virtual bool isDrawnGrid() const{ return isDrawnGrid_; }
00084 
00085     //--------------------------------------------------------------------------
00086     /**
00087      * 軸の描画フラグ設定
00088      * @param isDrawnAxis 軸を描画するならtrue
00089      */
00090     virtual void setDrawnAxis(bool isDrawnAxis){ isDrawnAxis_ = isDrawnAxis; }
00091 
00092     /**
00093      * 軸を描画するか
00094      * @return 軸を描画するならtrue
00095      */
00096     virtual bool isDrawnAxis() const{ return isDrawnAxis_; }
00097 
00098     //--------------------------------------------------------------------------
00099     /**
00100      * メッシュバウンディングの描画フラグ設定
00101      * @param isDrawnMeshBounding メッシュバウンディングを描画するならtrue
00102      */
00103     virtual void setDrawnMeshBounding(bool isDrawnMeshBounding){
00104         isDrawnMeshBounding_ = isDrawnMeshBounding;
00105     }
00106 
00107     /**
00108      * メッシュバウンディングを描画するか
00109      * @return メッシュバウンディングを描画するならtrue
00110      */
00111     virtual bool isDrawnMeshBounding() const{ return isDrawnMeshBounding_; }
00112 
00113     //--------------------------------------------------------------------------
00114     /**
00115      * ボーンの描画フラグ設定
00116      * @param isDrawnBone ボーンを描画するならtrue
00117      */
00118     virtual void setDrawnBone(bool isDrawnBone){ isDrawnBone_ = isDrawnBone; }
00119 
00120     /**
00121      * ボーンを描画するか
00122      * @return ボーンを描画するならtrue
00123      */
00124     virtual bool isDrawnBone() const{ return isDrawnBone_; }
00125 
00126 protected:
00127     //--------------------------------------------------------------------------
00128     /**
00129      * グリッドのセットアップ
00130      */
00131     virtual void setupGrid();
00132 
00133     /**
00134      * 軸のセットアップ
00135      */
00136     virtual void setupAxis();
00137 
00138     /**
00139      * メッシュバウンディングのセットアップ
00140      */
00141     virtual void setupMeshBounding();
00142 
00143     /**
00144      * ボーンのセットアップ
00145      */
00146     virtual void setupBone();
00147 
00148     //--------------------------------------------------------------------------
00149     /// プリミティブレンダラ
00150     PrimitiveRenderer* renderer_;
00151     /// シーン
00152     Scene* scene_;
00153     /// カメラ
00154     Camera* camera_;
00155     /// メッシュリスト
00156     ArrayList<Mesh*> meshList_;
00157 
00158     /// グリッドを描画するか
00159     bool isDrawnGrid_;
00160     /// 軸を描画するか
00161     bool isDrawnAxis_;
00162     /// メッシュバウンディングを描画するか
00163     bool isDrawnMeshBounding_;
00164     /// ボーンを描画するか
00165     bool isDrawnBone_;
00166 
00167     /// メッシュバウンディングカラー
00168     static const Color4c meshBoundingColor_;
00169     /// ボーンカラー
00170     static const Color4c boneColor_;
00171 
00172 private:
00173     //--------------------------------------------------------------------------
00174     // コピーコンストラクタの隠蔽
00175     InformationRenderer(const InformationRenderer& copy);
00176 
00177     // 代入コピーの隠蔽
00178     void operator =(const InformationRenderer& copy);
00179 
00180 };
00181 
00182 //------------------------------------------------------------------------------
00183 } // End of namespace Lamp
00184 #endif // End of INFORMATION_RENDERER_H_
00185 //------------------------------------------------------------------------------

Generated on Wed Mar 16 10:29:31 2005 for Lamp by doxygen 1.3.2