/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_RotateViewUpdater.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: 27868 $ *---------------------------------------------------------------------------*/ #ifndef NW_GFX_ROTATEVIEWUPDATER_H_ #define NW_GFX_ROTATEVIEWUPDATER_H_ #include #include namespace nw { namespace os { class IAllocator; } // namespace os namespace gfx { //--------------------------------------------------------------------------- //! @brief カメラの回転角度を用いてビューマトリクスを更新するクラスです。 //--------------------------------------------------------------------------- class RotateViewUpdater : public CameraViewUpdater { private: NW_DISALLOW_COPY_AND_ASSIGN(RotateViewUpdater); public: NW_UT_RUNTIME_TYPEINFO; //---------------------------------------- //! @name 作成/破棄 //@{ //--------------------------------------------------------------------------- //! @brief ビューマトリクスのアップデータを生成します。 //! //! @param[in] allocator アロケータです。 //! //! @return 生成したビューマトリクスのアップデータです。 //--------------------------------------------------------------------------- static RotateViewUpdater* Create(os::IAllocator* allocator); //--------------------------------------------------------------------------- //! @brief ビューマトリクスのアップデータを生成します。 //! //! @param[in] allocator アロケータです。 //! @param[in] resUpdater アップデータのリソースです。 //! //! @return 生成したビューマトリクスのアップデータです。 //--------------------------------------------------------------------------- static RotateViewUpdater* Create( os::IAllocator* allocator, ResRotateViewUpdater resUpdater); //! @details :private static void GetMemorySizeInternal( os::MemorySizeCalculator* pSize, bool isDynamicBuild) { os::MemorySizeCalculator& size = *pSize; size += sizeof(RotateViewUpdater); if (isDynamicBuild) { size += sizeof(ResRotateViewUpdaterData); } } //@} //---------------------------------------- //! @name ビューマトリクス //@{ //--------------------------------------------------------------------------- //! @brief ビューマトリクスを更新します。 //! //! @param[out] viewMatrix 更新するビューマトリクスです。 //! @param[in] worldMatrix カメラのワールドマトリクスです。 //! @param[in] cameraPosition カメラ位置です。 //--------------------------------------------------------------------------- void virtual Update( math::MTX34* viewMatrix, const math::MTX34& worldMatrix, const math::VEC3& cameraPosition); //@} //---------------------------------------- //! @name リソース //@{ //! ビューアップデータのリソースを取得します。 virtual ResCameraViewUpdater GetResource() { return this->m_Resource; } //! ビューアップデータのリソースを取得します。 virtual const ResCameraViewUpdater GetResource() const { return this->m_Resource; } //@} //! @brief ViewUpdaterの種類を取得します。 virtual anim::ResCameraAnimData::ViewUpdaterKind Kind() const { return anim::ResCameraAnimData::VIEW_UPDATER_ROTATE; } private: //---------------------------------------- //! @name コンストラクタ/デストラクタ //@{ //--------------------------------------------------------------------------- //! @brief コンストラクタです。 //--------------------------------------------------------------------------- RotateViewUpdater( os::IAllocator* pAllocator, bool isDynamic, ResRotateViewUpdater resUpdater); //--------------------------------------------------------------------------- //! @brief デストラクタです。 //--------------------------------------------------------------------------- virtual ~RotateViewUpdater(); //@} ResRotateViewUpdater m_Resource; }; } // namespace gfx } // namespace nw #endif // NW_GFX_ROTATEVIEWUPDATER_H_