/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_OrthoProjectionUpdater.h Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo and/or its licensed developers and are protected by national and international copyright laws. 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. The content herein is highly confidential and should be handled accordingly. $Revision: 31311 $ *---------------------------------------------------------------------------*/ #ifndef NW_GFX_ORTHOPROJECTIONUPDATER_H_ #define NW_GFX_ORTHOPROJECTIONUPDATER_H_ #include #include namespace nw { namespace os { class IAllocator; } // namespace os namespace gfx { //--------------------------------------------------------------------------- //! @brief 正射影で射影行列を更新するためのクラスです。 //--------------------------------------------------------------------------- class OrthoProjectionUpdater : public CameraProjectionUpdater { private: NW_DISALLOW_COPY_AND_ASSIGN(OrthoProjectionUpdater); public: NW_UT_RUNTIME_TYPEINFO; //---------------------------------------- //! @name 作成/破棄 //@{ //--------------------------------------------------------------------------- //! @brief 正射影によるプロジェクションアップデータを生成します。 //! //! @param[in] allocator アロケータです。 //! //! @return 生成したプロジェクションのアップデータを返します。 //--------------------------------------------------------------------------- static OrthoProjectionUpdater* Create(os::IAllocator* allocator); //--------------------------------------------------------------------------- //! @brief 正射影によるプロジェクションアップデータを生成します。 //! //! @param[in] allocator アロケータです。 //! @param[in] resUpdater アップデータのリソースです。 //! //! @return 生成したプロジェクションのアップデータを返します。 //--------------------------------------------------------------------------- static OrthoProjectionUpdater* Create( os::IAllocator* allocator, ResOrthoProjectionUpdater resUpdater); //! @details :private static void GetMemorySizeInternal( os::MemorySizeCalculator* pSize, bool isDynamicBuild) { os::MemorySizeCalculator& size = *pSize; size += sizeof(OrthoProjectionUpdater); if (isDynamicBuild) { size += sizeof(ResOrthoProjectionUpdaterData); } } //@} //---------------------------------------- //! @name プロジェクションマトリクス //@{ //--------------------------------------------------------------------------- //! @brief プロジェクションマトリクスを更新します。 //! //! @param[in] projectionMatrix 更新するプロジェクションマトリクスです。 //! @param[in] textureProjectionMatrix 更新するプロジェクションテクスチャ用射影行列です。 //--------------------------------------------------------------------------- void virtual Update(math::MTX44* projectionMatrix, math::Matrix34* textureProjectionMatrix); //@} //---------------------------------------- //! @name リソース //@{ //! プロジェクションアップデータのリソースを取得します。 virtual ResCameraProjectionUpdater GetResource() { return this->m_Resource; } //! プロジェクションアップデータのリソースを取得します。 virtual const ResCameraProjectionUpdater GetResource() const { return this->m_Resource; } //@} //! @brief プロジェクションアップデータの種類を取得します。 virtual anim::ResCameraAnimData::ProjectionUpdaterKind Kind() const { return anim::ResCameraAnimData::PROJECTION_UPDATER_ORTHO; } private: //---------------------------------------- //! @name コンストラクタ/デストラクタ //@{ //--------------------------------------------------------------------------- //! @brief コンストラクタです。 //--------------------------------------------------------------------------- OrthoProjectionUpdater( os::IAllocator* pAllocator, bool isDynamic, ResOrthoProjectionUpdater resUpdater); //--------------------------------------------------------------------------- //! @brief デストラクタです。 //--------------------------------------------------------------------------- virtual ~OrthoProjectionUpdater(); //@} ResOrthoProjectionUpdater m_Resource; }; } // namespace gfx } // namespace nw #endif // NW_GFX_ORTHOPROJECTIONUPDATER_H_