/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_MeshRenderer.h Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo and/or its licensed developers and are protected by national and international copyright laws. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. The content herein is highly confidential and should be handled accordingly. $Revision: 31311 $ *---------------------------------------------------------------------------*/ #ifndef NW_GFX_MESHRENDERER_H_ #define NW_GFX_MESHRENDERER_H_ #include #include #include #include #include #include #include namespace nw { namespace os { class IAllocator; } // namespace os namespace gfx { class Model; class SkeletalModel; class Mesh; class RenderContext; class PrimitiveSet; class Primitive; //--------------------------------------------------------------------------- //! @brief メッシュの 描画プロセスを制御するクラスです。 //--------------------------------------------------------------------------- class MeshRenderer : public GfxObject { private: NW_DISALLOW_COPY_AND_ASSIGN(MeshRenderer); public: //---------------------------------------- //! @name 作成/破棄 //@{ //! @brief メッシュレンダラ を生成します。 //! //! @param[in] pAllocator インスタンス生成用のメモリを取得するアロケータです。 //! //! @return 新しい MeshRenderer のインスタンスを返します。 //! static MeshRenderer* Create(nw::os::IAllocator* pAllocator); //@} //---------------------------------------- //! @name 取得/設定 //@{ //! @brief レンダーコンテキストを設定します。 void SetRenderContext(RenderContext* renderContext) { m_RenderContext = renderContext; } //@} //---------------------------------------- //! @name 描画 //@{ //! @brief メッシュを描画します。 //! //! @param[in] mesh 描画するメッシュです。 //! @param[in] model メッシュの所有者となるモデルです。 //! void RenderMesh(ResMesh mesh, Model* model); //@} private: //! @brief コンストラクタです。 MeshRenderer(nw::os::IAllocator* allocator) : GfxObject(allocator), m_RenderContext(NULL) {} //! @brief デストラクタです。 virtual ~MeshRenderer() {} //! @brief 分割データ形式のシェイプを描画します。 //! //! @param[in] model 描画するメッシュの親モデルです。 //! @param[in] shape 形状クラスです。 //! @param[in] currentPrimitiveIndex 描画するプリミティブ番号です。 //! void RenderSeparateDataShape( Model* model, ResSeparateDataShape shape, s32 currentPrimitiveIndex); //! @brief パーティクルシェイプを描画します。 //! //! @param[in] model 描画するメッシュの親モデルです。 //! @param[in] shape 形状クラスです。 //! @param[in] index モデルでのパーティクルシェイプのインデックスです。 //! void RenderParticleShape( Model* model, ResParticleShape shape, int index); //! @brief マトリクスパレットを設定します。 //! //! @param[in] skeletalModel スケルタルモデルです。 //! @param[in] primitiveSet プリミティブセットです。 //! @param[in] boneIndexCount ボーンインデックスの数です。 //! void SetMatrixPalette( SkeletalModel* skeletalModel, ResPrimitiveSet primitiveSet, s32 boneIndexCount); RenderContext* m_RenderContext; }; } // namespace gfx } // namespace nw #endif // NW_GFX_MESH_RENDERER_H_