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

CollisionRenderer.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 COLLISION_RENDERER_H_
00026 #define COLLISION_RENDERER_H_
00027 
00028 namespace Lamp{
00029 
00030 class PrimitiveRenderer;
00031 class Camera;
00032 class CollisionScene;
00033 class StaticSphereCollision;
00034 class StaticDeformedMeshCollision;
00035 
00036 //------------------------------------------------------------------------------
00037 /**
00038  * コリジョンレンダラ
00039  */
00040 class CollisionRenderer{
00041 public:
00042     /**
00043      * コンストラクタ
00044      */
00045     CollisionRenderer();
00046 
00047     /**
00048      * デストラクタ
00049      */
00050     virtual ~CollisionRenderer();
00051 
00052     //--------------------------------------------------------------------------
00053     // レンダリング準備
00054     //--------------------------------------------------------------------------
00055     /**
00056      * レンダリング準備を行う
00057      * @param scene レンダリングを行うコリジョンシーン
00058      * @param camera レンダリングに使用するカメラ
00059      */
00060     virtual void renderingSetup(CollisionScene* scene, Camera* camera);
00061 
00062     //--------------------------------------------------------------------------
00063     // レンダリング
00064     //--------------------------------------------------------------------------
00065     /**
00066      * レンダリングを行う
00067      */
00068     virtual void rendering();
00069 
00070     //--------------------------------------------------------------------------
00071     // 描画フラグ
00072     //--------------------------------------------------------------------------
00073     /**
00074      * ノードの描画フラグ設定
00075      * @param isDrawnNode ノードを描画するならtrue
00076      */
00077     virtual void setDrawnNode(bool isDrawnNode){ isDrawnNode_ = isDrawnNode; }
00078 
00079     /**
00080      * ノードを描画するか
00081      * @return ノードを描画するならtrue
00082      */
00083     virtual bool isDrawnNode() const{ return isDrawnNode_; }
00084 
00085     //--------------------------------------------------------------------------
00086     /**
00087      * リーフの描画フラグ設定
00088      * @param isDrawnLeaf リーフを描画するならtrue
00089      */
00090     virtual void setDrawnLeaf(bool isDrawnLeaf){ isDrawnLeaf_ = isDrawnLeaf; }
00091 
00092     /**
00093      * リーフを描画するか
00094      * @return リーフを描画するならtrue
00095      */
00096     virtual bool isDrawnLeaf() const{ return isDrawnLeaf_; }
00097 
00098 protected:
00099     //--------------------------------------------------------------------------
00100     /**
00101      * 静的球コリジョンのセットアップ
00102      * @param sphereCollision 静的球コリジョン
00103      */
00104     virtual void setupStaticSphereCollision(
00105         StaticSphereCollision* sphereCollision);
00106 
00107     /**
00108      * 静的変形メッシュコリジョンのセットアップ
00109      * @param meshCollision 静的変形メッシュコリジョン
00110      */
00111     virtual void setupStaticDeformedMeshCollision(
00112         StaticDeformedMeshCollision* meshCollision);
00113 
00114     //--------------------------------------------------------------------------
00115     /// プリミティブレンダラ
00116     PrimitiveRenderer* renderer_;
00117     /// シーン
00118     CollisionScene* scene_;
00119     /// カメラ
00120     Camera* camera_;
00121     /// ノードを描画するか
00122     bool isDrawnNode_;
00123     /// リーフを描画するか
00124     bool isDrawnLeaf_;
00125 
00126 private:
00127     //--------------------------------------------------------------------------
00128     // コピーコンストラクタの隠蔽
00129     CollisionRenderer(const CollisionRenderer& copy);
00130 
00131     // 代入コピーの隠蔽
00132     void operator =(const CollisionRenderer& copy);
00133 
00134 };
00135 
00136 //------------------------------------------------------------------------------
00137 } // End of namespace Lamp
00138 #endif // End of COLLISION_RENDERER_H_
00139 //------------------------------------------------------------------------------

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