1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: gfx_IMaterialIdGenerator.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: 20400 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NW_GFX_IMATERIALIDGENERATOR_H_ 17 #define NW_GFX_IMATERIALIDGENERATOR_H_ 18 19 namespace nw 20 { 21 namespace gfx 22 { 23 24 class Material; 25 26 //--------------------------------------------------------------------------- 27 //! @brief マテリアルIDの生成を行うインターフェースです。 28 //! SceneInitializer からマテリアルごとに Accept がコールされます。 29 //! また、 SceneInitializer::End で Generate が呼び出されます。 30 //--------------------------------------------------------------------------- 31 class IMaterialIdGenerator : public GfxObject 32 { 33 private: 34 NW_DISALLOW_COPY_AND_ASSIGN(IMaterialIdGenerator); 35 36 public: 37 NW_UT_RUNTIME_TYPEINFO; 38 39 40 41 //! @brief マテリアルを受け取ります。 42 //! SceneInitializer の Visit 経由で呼び出されます。 43 //! 44 //! @param[in] material マテリアルです。 45 //! 46 virtual void Accept(Material* material) = 0; 47 48 //---------------------------------------- 49 //! @name 生成 50 //@{ 51 52 //! @brief マテリアルIDを生成します。 53 //! 通常は SceneInitializer::End で呼び出されます。 54 virtual void Generate() = 0; 55 56 //@} 57 58 protected: 59 //---------------------------------------- 60 //! @name コンストラクタ/デストラクタ 61 //@{ 62 63 //! コンストラクタです。 IMaterialIdGenerator(os::IAllocator * allocator)64 IMaterialIdGenerator(os::IAllocator* allocator) : GfxObject(allocator) {} 65 66 //@} 67 }; 68 69 } // namespace gfx 70 } // namespace nw 71 72 #endif // NW_GFX_IMATERIALIDGENERATOR_H_ 73