/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_CameraViewUpdater.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_CAMERAVIEWUPDATER_H_ #define NW_GFX_CAMERAVIEWUPDATER_H_ #include #include namespace nw { namespace math { struct VEC3; struct MTX34; } namespace gfx { //--------------------------------------------------------------------------- //! @brief ビューマトリクスを更新するインタフェースです。 //! //! ICameraViewUpdater は廃止され CameraViewUpdater に変更されました。 //--------------------------------------------------------------------------- class CameraViewUpdater : public GfxObject { private: NW_DISALLOW_COPY_AND_ASSIGN(CameraViewUpdater); public: NW_UT_RUNTIME_TYPEINFO; //---------------------------------------- //! @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) = 0; //@} //! 動的に生成されたアップデータかどうかのフラグを取得します。 bool IsDynamic() { return this->m_IsDynamic; } //---------------------------------------- //! @name リソース //@{ //! ビューアップデータのリソースを取得します。 virtual ResCameraViewUpdater GetResource() = 0; //! ビューアップデータのリソースを取得します。 virtual const ResCameraViewUpdater GetResource() const = 0; //@} protected: //! @brief コンストラクタです。 CameraViewUpdater(os::IAllocator* allocator, bool isDynamic) : GfxObject(allocator), m_IsDynamic(isDynamic) {} protected: //! カメラターゲットのデフォルト値です。 static const math::VEC3 VIEW_TARGET_POSITION; //! カメラアップベクトルのデフォルト値です。 static const math::VEC3 VIEW_UPWARD_VECTOR; //! カメラ回転のデフォルト値です。 static const math::VEC3 VIEW_VIEW_ROTATE; //! カメラツイストのデフォルト値です。 static const float VIEW_TWIST; private: bool m_IsDynamic; }; } // namespace gfx } // namespace nw #endif // NW_GFX_CAMERAVIEWUPDATER_H_