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