1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: gfx_CameraViewUpdater.h 4 5 Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Revision: 27365 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NW_GFX_CAMERAVIEWUPDATER_H_ 17 #define NW_GFX_CAMERAVIEWUPDATER_H_ 18 19 #include <nw/gfx/gfx_GfxObject.h> 20 #include <nw/gfx/res/gfx_ResCamera.h> 21 22 namespace nw 23 { 24 25 namespace math 26 { 27 struct VEC3; 28 struct MTX34; 29 } 30 31 namespace gfx 32 { 33 34 //--------------------------------------------------------------------------- 35 //! @brief ビューマトリクスを更新するインタフェースです。 36 //! 37 //! ICameraViewUpdater は廃止され CameraViewUpdater に変更されました。 38 //--------------------------------------------------------------------------- 39 class CameraViewUpdater : public GfxObject 40 { 41 private: 42 NW_DISALLOW_COPY_AND_ASSIGN(CameraViewUpdater); 43 44 public: 45 NW_UT_RUNTIME_TYPEINFO; 46 47 //---------------------------------------- 48 //! @name ビューマトリクス 49 //@{ 50 51 //--------------------------------------------------------------------------- 52 //! @brief ビューマトリクスを更新します。 53 //! 54 //! @param[out] viewMatrix 更新するビューマトリクスです。 55 //! @param[in] worldMatrix カメラの親ノードのワールドマトリクスです。 56 //! @param[in] cameraPosition カメラ位置です。 57 //--------------------------------------------------------------------------- 58 void virtual Update( 59 math::MTX34* viewMatrix, 60 const math::MTX34& worldMatrix, 61 const math::VEC3& cameraPosition) = 0; 62 63 //@} 64 65 //! 動的に生成されたアップデータかどうかのフラグを取得します。 IsDynamic()66 bool IsDynamic() 67 { 68 return this->m_IsDynamic; 69 } 70 71 //---------------------------------------- 72 //! @name リソース 73 //@{ 74 75 //! ビューアップデータのリソースを取得します。 76 virtual ResCameraViewUpdater GetResource() = 0; 77 78 //! ビューアップデータのリソースを取得します。 79 virtual const ResCameraViewUpdater GetResource() const = 0; 80 81 //@} 82 83 //! @brief ViewUpdaterの種類を取得します。 84 virtual anim::ResCameraAnimData::ViewUpdaterKind Kind() const = 0; 85 86 87 protected: 88 89 //! @brief コンストラクタです。 CameraViewUpdater(os::IAllocator * allocator,bool isDynamic)90 CameraViewUpdater(os::IAllocator* allocator, bool isDynamic) 91 : GfxObject(allocator), 92 m_IsDynamic(isDynamic) 93 {} 94 95 protected: 96 //! カメラターゲットのデフォルト値です。 97 static const math::VEC3 VIEW_TARGET_POSITION; 98 //! カメラアップベクトルのデフォルト値です。 99 static const math::VEC3 VIEW_UPWARD_VECTOR; 100 //! カメラ回転のデフォルト値です。 101 static const math::VEC3 VIEW_VIEW_ROTATE; 102 //! カメラツイストのデフォルト値です。 103 static const float VIEW_TWIST; 104 105 private: 106 bool m_IsDynamic; 107 }; 108 109 } // namespace gfx 110 } // namespace nw 111 112 #endif // NW_GFX_CAMERAVIEWUPDATER_H_ 113