1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: gfx_ParticleMaterialActivator.h 4 5 Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Revision: 28401 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NW_GFX_PARTICLEMATERIALACTIVATOR_H_ 17 #define NW_GFX_PARTICLEMATERIALACTIVATOR_H_ 18 19 #include <nw/gfx/gfx_GfxObject.h> 20 #include <nw/gfx/gfx_IMaterialActivator.h> 21 22 namespace nw 23 { 24 namespace os 25 { 26 class IAllocator; 27 } // namesapce os 28 29 namespace gfx 30 { 31 32 class RenderContext; 33 class Material; 34 35 //--------------------------------------------------------------------------- 36 //! @brief マテリアルを更新するためのクラスです。 37 //! 38 //! パーティクルの簡易マテリアル設定が行われる場合に呼び出されます。 39 //! 現状では、レンダーコンテキストに保持されており変更できません。 40 //--------------------------------------------------------------------------- 41 class ParticleMaterialActivator : public IMaterialActivator 42 { 43 private: 44 NW_DISALLOW_COPY_AND_ASSIGN(ParticleMaterialActivator); 45 46 public: 47 NW_UT_RUNTIME_TYPEINFO; 48 49 //--------------------------------------------------------------------------- 50 //! @brief マテリアルアクティベータを生成します。 51 //! 52 //! @param[in] allocator アロケータです。 53 //! 54 //! @return 生成したマテリアルアクティベータを返します。 55 //--------------------------------------------------------------------------- 56 static ParticleMaterialActivator* Create(os::IAllocator* allocator); 57 58 //--------------------------------------------------------------------------- 59 //! @brief マテリアルを有効化します。 60 //! 61 //! @param[in] renderContext レンダーコンテキストです。 62 //! @param[in] material 有効化するマテリアルです。 63 //--------------------------------------------------------------------------- 64 virtual void Activate(RenderContext* renderContext, const Material* material); 65 66 private: 67 //! コンストラクタです。 68 ParticleMaterialActivator(os::IAllocator* allocator); 69 70 //! デストラクタです。 71 virtual ~ParticleMaterialActivator(); 72 }; 73 74 } // namespace gfx 75 } // namespace nw 76 77 #endif // NW_GFX_PARTICLEMATERIALACTIVATOR_H_ 78