/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_FrustumProjectionUpdater.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_FRUSTUMPROJECTIONUPDATER_H_ #define NW_GFX_FRUSTUMPROJECTIONUPDATER_H_ #include #include namespace nw { namespace os { class IAllocator; } // namespace os namespace gfx { //--------------------------------------------------------------------------- //! @brief 視錐台を用いて射影行列を更新するためのクラスです。 //--------------------------------------------------------------------------- class FrustumProjectionUpdater : public CameraProjectionUpdater { private: NW_DISALLOW_COPY_AND_ASSIGN(FrustumProjectionUpdater); public: NW_UT_RUNTIME_TYPEINFO; //---------------------------------------- //! @name 作成/破棄 //@{ //--------------------------------------------------------------------------- //! @brief プロジェクションマトリクスアップデータを生成します。 //! //! @param[in] allocator アロケータです。 //! //! @return 生成したプロジェクションのアップデータを返します。 //--------------------------------------------------------------------------- static FrustumProjectionUpdater* Create(os::IAllocator* allocator); //--------------------------------------------------------------------------- //! @brief リソースからプロジェクションマトリクスアップデータを生成します。 //! //! @param[in] allocator アロケータです。 //! @param[in] resUpdater アップデータのリソースです。 //! //! @return 生成したプロジェクションのアップデータを返します。 //--------------------------------------------------------------------------- static FrustumProjectionUpdater* Create( os::IAllocator* allocator, ResFrustumProjectionUpdater resUpdater); //@} //---------------------------------------- //! @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; } //@} private: //---------------------------------------- //! @name コンストラクタ/デストラクタ //@{ //--------------------------------------------------------------------------- //! @brief コンストラクタです。 //--------------------------------------------------------------------------- FrustumProjectionUpdater( os::IAllocator* pAllocator, bool isDynamic, ResFrustumProjectionUpdater resUpdater); //--------------------------------------------------------------------------- //! @brief デストラクタです。 //--------------------------------------------------------------------------- virtual ~FrustumProjectionUpdater(); //@} ResFrustumProjectionUpdater m_Resource; }; } // namespace gfx } // namespace nw #endif // NW_GFX_FRUSTUMPROJECTIONUPDATER_H_