00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc. 00002 // 00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., 00004 // and considered a trade secret as defined under civil and criminal statutes. 00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of 00006 // unauthorized use or misappropriation of its trade secrets. Use of this information 00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under 00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use. 00009 00010 // HOpCameraManipulate.h : interface of the HOpCameraManipulate class 00011 // Manipulates the camera of current view usual a virtual trackball 00012 // interface 00013 00014 #ifndef _HOPCAMERAManipulate_H 00015 #define _HOPCAMERAManipulate_H 00016 00017 #ifdef H_PACK_8 00018 #pragma pack(push) 00019 #pragma pack(8) 00020 #endif 00021 00022 #include "HTools.h" 00023 #include "HBaseOperator.h" 00024 class HOpCameraRelativeOrbit; 00025 class HOpCameraOrbit; 00026 class HOpCameraPan; 00027 class HOpCameraZoom; 00028 class HTClient; 00029 class HEventInfo; 00031 00042 class MVO_API HOpCameraManipulate : public HBaseOperator 00043 { 00044 public: 00057 HOpCameraManipulate (HBaseView* view, int DoRepeat=0, int DoCapture=1, HBaseOperator *orbit = 0, HBaseOperator *pan = 0, HBaseOperator *zoom = 0, HBaseOperator *relative = 0, bool AllowHandleActivation = false); 00058 virtual ~HOpCameraManipulate(); 00059 00061 virtual const char * GetName(); 00062 00063 00069 virtual int OnLButtonDown (HEventInfo &hevent); 00070 00071 00079 virtual int OnLButtonDownAndMove(HEventInfo &hevent); 00080 00081 00082 00088 virtual int OnLButtonUp (HEventInfo &hevent); 00089 00090 00096 virtual int OnMButtonDown (HEventInfo &hevent); 00097 00098 00104 virtual int OnMButtonDownAndMove(HEventInfo &hevent); 00105 00106 00107 00113 virtual int OnMButtonUp (HEventInfo &hevent); 00114 00115 00121 virtual int OnRButtonDown (HEventInfo &hevent); 00122 00123 00129 virtual int OnRButtonDownAndMove(HEventInfo &hevent); 00130 00131 00132 00138 virtual int OnRButtonUp (HEventInfo &hevent); 00139 00145 virtual HBaseOperator * Clone(); 00146 00147 virtual bool OperatorStarted(); 00148 00152 HOpCameraOrbit * GetOrbitOperator() { return reinterpret_cast<HOpCameraOrbit *>(m_pOrbitOperator); } 00153 00154 00160 void HandleDblClk(float requested_time, float actual_time); 00161 00165 bool GetLButtonDown() { return m_bLButtonDown; } 00166 00167 protected: 00168 00169 HTClient *m_pDblClkTimer; 00171 HBaseOperator *m_pOrbitOperator; 00172 HBaseOperator *m_pRelativeOrbitOperator; 00173 HBaseOperator *m_pPanOperator; 00174 HBaseOperator *m_pZoomOperator; 00176 HPoint m_ptRealOld; 00177 private: 00178 bool m_bAllowHandleActivation; 00179 bool m_bLButtonDown; 00180 bool m_bLButtonUp; 00181 bool m_bForceDown; 00182 HPoint m_ptRealFirst; 00183 HEventInfo *m_LastEvent; 00184 float m_time; 00185 00186 }; 00187 00188 #ifdef H_PACK_8 00189 #pragma pack(pop) 00190 #endif 00191 00192 #endif 00193 00194 00195 00196