/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_SceneObject.h Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. 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. $Revision: 22719 $ *---------------------------------------------------------------------------*/ #ifndef NW_GFX_SCENEOBJECT_H_ #define NW_GFX_SCENEOBJECT_H_ #include #include #include #include #include #include #include #include #include namespace nw { namespace gfx { class SceneNode; class TransformNode; //! @brief シーンノードの子を管理するためのリストです。 typedef ut::Children > SceneNodeChildren; //--------------------------------------------------------------------------- //! @brief シーン上のオブジェクトのベースクラスです。 //--------------------------------------------------------------------------- class SceneObject : public GfxObject { private: NW_DISALLOW_COPY_AND_ASSIGN(SceneObject); public: NW_UT_RUNTIME_TYPEINFO; static const int DEFAULT_MAX_CHILDREN = 8; //!< 固定サイズメモリ時の子の最大数です。 static const int DEFAULT_MAX_CALLBACKS = 4; //!< 固定サイズメモリ時のコールバックの最大数です。 static const int MAX_NAME_LENGTH = 256; //!< シーンオブジェクトの名前の制限です。 //---------------------------------------- //! @name リソース //@{ //! @brief シーンオブジェクトのリソースを取得します。 ResSceneObject GetResSceneObject() { return m_ResObject; } //! @brief シーンオブジェクトのリソースを取得します。 const ResSceneObject GetResSceneObject() const { return m_ResObject; } //! @brief リソースから名前を取得します。 const char* GetName() const { NW_ASSERT(this->m_ResObject.IsValid()); return this->m_ResObject.GetName(); } //@} protected: //---------------------------------------- //! @name コンストラクタ/デストラクタ //@{ //! @brief コンストラクタです。 SceneObject(os::IAllocator* allocator, ResSceneObject resObj) : GfxObject(allocator), m_ResObject(resObj) {} //! @brief デストラクタです。 virtual ~SceneObject() {} //@} private: ResSceneObject m_ResObject; }; } // namespace gfx } // namespace nw #endif // NW_GFX_SCENEOBJECT_H_