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