00001 // 00002 // Copyright (c) 2000 by Tech Soft 3D, LLC. 00003 // The information contained herein is confidential and proprietary to 00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under 00005 // civil and criminal statutes. Tech Soft 3D shall pursue its civil 00006 // and criminal remedies in the event of unauthorized use or misappropriation 00007 // of its trade secrets. Use of this information by anyone other than 00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a 00009 // written non-disclosure agreement, expressly prescribing the scope and 00010 // manner of such use. 00011 // 00012 // $Id: 977b83ce9ae0482ab7c5ebc99502cc263acc83d0 $ 00013 // 00014 00015 // HOpObjectClash.h : interface of the HOpObjectClash class 00016 // translate items in the selection list of the associated view 00017 // 00018 // currently supports translation of item if it is a segment 00022 #ifndef _HOPOBJECTCLASH_H 00023 #define _HOPOBJECTCLASH_H 00024 00025 #ifdef H_PACK_8 00026 #pragma pack(push) 00027 #pragma pack(8) 00028 #endif 00029 00030 #include "HTools.h" 00031 #include "HBaseOperator.h" 00032 #include "HOpObjectTranslate.h" 00033 00034 class HSelectionSet; 00035 00056 class MVO_API HOpObjectClash : public HOpObjectTranslate 00057 { 00058 protected: 00061 enum HOOC_SelectMode { 00062 HOOC_World = 0x1, 00063 HOOC_Screen = 0x2, 00064 HOOC_Shell = 0x3, 00065 HOOC_Enclosure = 0x4 00066 }; 00069 enum HOOC_Result { 00070 HOOC_Unknown = -1, 00071 HOOC_In = 0x1, 00072 HOOC_Out = 0x2, 00073 HOOC_Clash = 0x3 00074 }; 00075 00076 00077 protected: 00083 int IntersectPolyline( HC_KEY key1, float *transformed_points1 ); 00084 00090 void ProcessSelectionResults( HC_KEY current_shell = INVALID_KEY, float *transformed_points = 0 ); 00091 00097 int TestEnclosure( HC_KEY current_shell_key, float *transformed_points ); 00098 00105 int GetScreenVolume( HC_KEY seg, HPoint &min, HPoint &max ); 00106 00112 virtual int SelectByScreenVolume( HSmartSelItem * sel_item ); 00113 00119 virtual int SelectByWorldVolume( HSmartSelItem * sel_item ); 00120 00126 virtual int SelectByEnclosure( HSmartSelItem * sel_item ); 00127 00133 virtual int SelectByShell( HSmartSelItem * sel_item ); 00134 00138 void SetSelectMode( int mode ); 00139 00146 int GetWorldVolume( HC_KEY seg, HPoint &min, HPoint &max ); 00147 00149 void GrabSelectionSet(); 00150 00152 void RestoreSelectionSet(); 00153 00155 bool m_save_spriting_mode; 00156 00158 HSelectionSet *m_pClashSelection; 00159 00161 int m_SelectMode; 00162 00164 int m_IntersectPolylinesVisible; 00165 00167 HC_KEY m_TempSegKey; 00168 00171 void ClashDetect (HEventInfo &hevent); 00172 00173 public: 00174 00180 HOpObjectClash (HBaseView* view, int DoRepeat=0, int DoCapture=1); 00181 00183 virtual ~HOpObjectClash(); 00184 00188 virtual const char * GetName(); 00189 00197 virtual int OnLButtonDown (HEventInfo &hevent); 00198 00204 virtual int OnLButtonDownAndMove(HEventInfo &hevent); 00205 00211 virtual int OnLButtonUp (HEventInfo &hevent); 00212 00234 virtual int OnKeyDown (HEventInfo &hevent); 00235 00241 virtual HBaseOperator * Clone(); 00242 00246 virtual void UpdateKeyList(void * data); 00247 00248 }; 00249 00250 00251 #ifdef H_PACK_8 00252 #pragma pack(pop) 00253 #endif 00254 00255 #endif 00256 00257 00258