HOpObjectClash.h
Go to the documentation of this file.
1 // Copyright (c) Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 // HOpObjectClash.h : interface of the HOpObjectClash class
11 // translate items in the selection list of the associated view
12 //
13 // currently supports translation of item if it is a segment
17 #ifndef _HOPOBJECTCLASH_H
18 #define _HOPOBJECTCLASH_H
19 
20 #ifdef H_PACK_8
21 #pragma pack(push)
22 #pragma pack(8)
23 #endif
24 
25 #include "HTools.h"
26 #include "HBaseOperator.h"
27 #include "HOpObjectTranslate.h"
28 
29 class HSelectionSet;
30 
51 class MVO_API HOpObjectClash : public HOpObjectTranslate
52 {
53 protected:
57  HOOC_World = 1,
58  HOOC_Screen = 2,
59  HOOC_Shell = 3,
60  HOOC_Enclosure = 4,
61  };
64  enum HOOC_Result {
65  HOOC_Unknown = -1,
66  HOOC_In = 1,
67  HOOC_Out = 2,
68  HOOC_Clash = 3,
69  };
70 
71 
72 protected:
78  int IntersectPolyline( HC_KEY key1, float * transformed_points1 );
79 
85  void ProcessSelectionResults( HC_KEY current_shell = HC_ERROR_KEY, float * transformed_points = 0 );
86 
92  int TestEnclosure( HC_KEY current_shell_key, float * transformed_points );
93 
100  int GetScreenVolume( HC_KEY seg, HPoint & min, HPoint & max );
101 
107  virtual int SelectByScreenVolume( HSmartSelItem * sel_item );
108 
114  virtual int SelectByWorldVolume( HSmartSelItem * sel_item );
115 
121  virtual int SelectByEnclosure( HSmartSelItem * sel_item );
122 
128  virtual int SelectByShell( HSmartSelItem * sel_item );
129 
133  void SetSelectMode( int mode );
134 
141  int GetWorldVolume( HC_KEY seg, HPoint & min, HPoint & max );
142 
144  void GrabSelectionSet();
145 
147  void RestoreSelectionSet();
148 
151 
154 
157 
160 
162  HC_KEY m_TempSegKey;
163 
166  void ClashDetect (HEventInfo & hevent);
167 
168 public:
169 
175  HOpObjectClash (HBaseView * view, int doRepeat = 0, int doCapture = 1);
176 
178  virtual ~HOpObjectClash();
179 
183  virtual const char * GetName();
184 
192  virtual int OnLButtonDown (HEventInfo & hevent);
193 
199  virtual int OnLButtonDownAndMove(HEventInfo & hevent);
200 
206  virtual int OnLButtonUp (HEventInfo & hevent);
207 
229  virtual int OnKeyDown (HEventInfo & hevent);
230 
236  virtual HBaseOperator * Clone();
237 
241  virtual void UpdateKeyList(void * data);
242 
243 };
244 
245 
246 #ifdef H_PACK_8
247 #pragma pack(pop)
248 #endif
249 
250 #endif
251 
252 
253 
virtual void UpdateKeyList(void *data)
HOOC_Result
Definition: HOpObjectClash.h:64
bool m_save_spriting_mode
Definition: HOpObjectClash.h:150
virtual HBaseOperator * Clone()
HOOC_SelectMode
Definition: HOpObjectClash.h:56
The HSelectionSet class manages a list of selected items.
Definition: HSelectionSet.h:66
virtual int OnLButtonDownAndMove(HEventInfo &hevent)
The HSmartSelItem - selection item which can handle instancing.
Definition: HSelectionItem.h:187
virtual int OnLButtonUp(HEventInfo &hevent)
virtual const char * GetName()
HC_KEY m_TempSegKey
Definition: HOpObjectClash.h:162
int m_IntersectPolylinesVisible
Definition: HOpObjectClash.h:159
Definition: HOpObjectClash.h:51
The HBaseOperator class serves as a base for classes which handle user input and operate on the scene...
Definition: HBaseOperator.h:60
The HPoint class is the data type of a three-dimensional point.
Definition: HGlobals.h:121
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:332
int m_SelectMode
Definition: HOpObjectClash.h:156
The HEventInfo class stores and manages event information.
Definition: HEventInfo.h:207
virtual int OnKeyDown(HEventInfo &hevent)
virtual int OnLButtonDown(HEventInfo &hevent)
The HOpObjectTranslate class translates a selected object.
Definition: HOpObjectTranslate.h:41
HSelectionSet * m_pClashSelection
Definition: HOpObjectClash.h:153