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 // HOpObjectClash.h : interface of the HOpObjectClash class 00011 // translate items in the selection list of the associated view 00012 // 00013 // currently supports translation of item if it is a segment 00017 #ifndef _HOPOBJECTCLASH_H 00018 #define _HOPOBJECTCLASH_H 00019 00020 #ifdef H_PACK_8 00021 #pragma pack(push) 00022 #pragma pack(8) 00023 #endif 00024 00025 #include "HTools.h" 00026 #include "HBaseOperator.h" 00027 #include "HOpObjectTranslate.h" 00028 00029 class HSelectionSet; 00030 00051 class MVO_API HOpObjectClash : public HOpObjectTranslate 00052 { 00053 protected: 00056 enum HOOC_SelectMode { 00057 HOOC_World = 1, 00058 HOOC_Screen = 2, 00059 HOOC_Shell = 3, 00060 HOOC_Enclosure = 4, 00061 }; 00064 enum HOOC_Result { 00065 HOOC_Unknown = -1, 00066 HOOC_In = 1, 00067 HOOC_Out = 2, 00068 HOOC_Clash = 3, 00069 }; 00070 00071 00072 protected: 00078 int IntersectPolyline( HC_KEY key1, float * transformed_points1 ); 00079 00085 void ProcessSelectionResults( HC_KEY current_shell = HC_ERROR_KEY, float * transformed_points = 0 ); 00086 00092 int TestEnclosure( HC_KEY current_shell_key, float * transformed_points ); 00093 00100 int GetScreenVolume( HC_KEY seg, HPoint & min, HPoint & max ); 00101 00107 virtual int SelectByScreenVolume( HSmartSelItem * sel_item ); 00108 00114 virtual int SelectByWorldVolume( HSmartSelItem * sel_item ); 00115 00121 virtual int SelectByEnclosure( HSmartSelItem * sel_item ); 00122 00128 virtual int SelectByShell( HSmartSelItem * sel_item ); 00129 00133 void SetSelectMode( int mode ); 00134 00141 int GetWorldVolume( HC_KEY seg, HPoint & min, HPoint & max ); 00142 00144 void GrabSelectionSet(); 00145 00147 void RestoreSelectionSet(); 00148 00150 bool m_save_spriting_mode; 00151 00153 HSelectionSet * m_pClashSelection; 00154 00156 int m_SelectMode; 00157 00159 int m_IntersectPolylinesVisible; 00160 00162 HC_KEY m_TempSegKey; 00163 00166 void ClashDetect (HEventInfo & hevent); 00167 00168 public: 00169 00175 HOpObjectClash (HBaseView * view, int doRepeat = 0, int doCapture = 1); 00176 00178 virtual ~HOpObjectClash(); 00179 00183 virtual const char * GetName(); 00184 00192 virtual int OnLButtonDown (HEventInfo & hevent); 00193 00199 virtual int OnLButtonDownAndMove(HEventInfo & hevent); 00200 00206 virtual int OnLButtonUp (HEventInfo & hevent); 00207 00229 virtual int OnKeyDown (HEventInfo & hevent); 00230 00236 virtual HBaseOperator * Clone(); 00237 00241 virtual void UpdateKeyList(void * data); 00242 00243 }; 00244 00245 00246 #ifdef H_PACK_8 00247 #pragma pack(pop) 00248 #endif 00249 00250 #endif 00251 00252 00253