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