/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_LookAtTargetViewUpdater.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: 20134 $ *---------------------------------------------------------------------------*/ #ifndef NW_GFX_LOOKATTARGETVIEWUPDATER_H_ #define NW_GFX_LOOKATTARGETVIEWUPDATER_H_ #include #include namespace nw { namespace os { class IAllocator; } // namespace os namespace gfx { //--------------------------------------------------------------------------- //! @brief カメラターゲットの座標と上方向ベクトルを用いてビューマトリクスを更新するクラスです。 //--------------------------------------------------------------------------- class LookAtTargetViewUpdater : public CameraViewUpdater { private: NW_DISALLOW_COPY_AND_ASSIGN(LookAtTargetViewUpdater); public: NW_UT_RUNTIME_TYPEINFO; //---------------------------------------- //! @name 作成/破棄 //@{ //--------------------------------------------------------------------------- //! @brief ビューマトリクスのアップデータを生成します。 //! //! @param[in] allocator アロケータです。 //! //! @return 生成したビューマトリクスのアップデータです。 //--------------------------------------------------------------------------- static LookAtTargetViewUpdater* Create(os::IAllocator* allocator); //--------------------------------------------------------------------------- //! @brief リソースからビューマトリクスのアップデータを生成します。 //! //! @param[in] allocator アロケータです。 //! @param[in] resUpdater アップデータのリソースです。 //! //! @return 生成したビューマトリクスのアップデータです。 //--------------------------------------------------------------------------- static LookAtTargetViewUpdater* Create( os::IAllocator* allocator, ResLookAtTargetViewUpdater resUpdater); //@} //---------------------------------------- //! @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; } //@} private: //---------------------------------------- //! @name コンストラクタ/デストラクタ //@{ //--------------------------------------------------------------------------- //! @brief コンストラクタです。 //--------------------------------------------------------------------------- LookAtTargetViewUpdater( os::IAllocator* pAllocator, bool isDynamic, ResLookAtTargetViewUpdater resUpdater); //--------------------------------------------------------------------------- //! @brief デストラクタです。 //--------------------------------------------------------------------------- virtual ~LookAtTargetViewUpdater(); //@} ResLookAtTargetViewUpdater m_Resource; }; } // namespace gfx } // namespace nw #endif // NW_GFX_LOOKATTARGETVIEWUPDATER_H_