HBaseOperator.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 
13 #ifndef _HBASEOPERATOR_H
14 #define _HBASEOPERATOR_H
15 
16 
17 #ifdef H_PACK_8
18 #pragma pack(push)
19 #pragma pack(8)
20 #endif
21 
22 #include "HTools.h"
23 #include "HBaseModel.h"
24 #include "HUtility.h"
25 #include "HEventListener.h"
26 
27 
29 #define EPSILON 0.00001F
30 
31 class HDB;
32 class HBaseModel;
33 class HBaseView;
34 class HEventInfo;
35 class HMouseListener;
36 
41 {
46 };
47 
49 
60 class MVO_API HBaseOperator : public HMouseListener
61 {
62 protected:
67  bool m_bOpStarted;
68  int m_doRepeat;
70 
73 
75 
77 
80  bool IsSpecialKey( HC_KEY key );
81 
84 
85 public:
86  int Repeat() { return m_doRepeat; }
87  int Capture() { return m_doCapture; }
88 
89 
95  virtual HBaseOperator * Clone();
96 
97  void SetFirstPoint(HPoint const& new_point) { m_ptFirst = new_point; }
98  HPoint const GetFirstPoint() { return m_ptFirst; }
99 
100  void SetNewPoint(HPoint const& new_point) { m_ptNew = new_point; }
101  HPoint const GetNewPoint() { return m_ptNew; }
102 
103  HBaseView * GetView() { return m_pView; }
104  void SetView(HBaseView* new_view) { m_pView = new_view; }
105 
106  virtual bool OperatorStarted() { return m_bOpStarted; }
107  void SetOperatorStarted(bool val) { m_bOpStarted = val; }
108 
109  void SetMapTouchesToMouseEvents(bool val) { m_bMapTouchesToMouseEvents = val; }
110 
117  HBaseOperator(HBaseView* view, int DoRepeat=0, int DoCapture=1);
118  virtual ~HBaseOperator();
119 
120 
134  virtual int OnMouseMove(HEventInfo &hevent);
135 
136 
139  virtual const char * GetName();
140 
141  // event methods; these will be overloaded by derived classes
142 
150  virtual int OnLButtonDown(HEventInfo &hevent);
151 
159  virtual int OnLButtonUp(HEventInfo &hevent);
160 
168  virtual int OnLButtonDblClk(HEventInfo &hevent);
169 
170 
178  virtual int OnLButtonDownAndMove(HEventInfo &hevent);
179 
180 
188  virtual int OnMButtonDown(HEventInfo &hevent);
189 
197  virtual int OnMButtonUp(HEventInfo &hevent);
198 
206  virtual int OnMButtonDblClk(HEventInfo &hevent);
207 
215  virtual int OnMButtonDownAndMove(HEventInfo &hevent);
216 
217 
225  virtual int OnRButtonDown(HEventInfo &hevent);
226 
234  virtual int OnRButtonUp(HEventInfo &hevent);
235 
243  virtual int OnRButtonDblClk(HEventInfo &hevent);
244 
252  virtual int OnRButtonDownAndMove(HEventInfo &hevent);
253 
261  virtual int OnLRButtonDownAndMove(HEventInfo &hevent);
262 
270  virtual int OnNoButtonDownAndMove(HEventInfo &hevent);
271 
279  virtual int OnTimer(HEventInfo &hevent);
280 
288  virtual int OnKeyDown(HEventInfo &hevent);
289 
297  virtual int OnKeyUp(HEventInfo &hevent);
298 
306  virtual int OnMouseWheel(HEventInfo &hevent);
307 
308 
316  virtual int OnTouchesDown(HEventInfo &hevent);
317 
325  virtual int OnTouchesMove(HEventInfo &hevent);
326 
334  virtual int OnTouchesUp(HEventInfo &hevent);
335 
336 
337 
338 
339 };
340 
342 
343 #ifdef H_PACK_8
344 #pragma pack(pop)
345 #endif
346 
347 #endif
HPoint m_ptFirst
Initial selection point.
Definition: HBaseOperator.h:71
Event handler is ready for processing.
Definition: HBaseOperator.h:45
HBaseView * m_pView
The HOOPS view corresponding to this operator.
Definition: HBaseOperator.h:74
virtual bool OperatorStarted()
Operator has been started if true, and has not been started if false.
Definition: HBaseOperator.h:106
void SetView(HBaseView *new_view)
Sets the view that this operator is associated with.
Definition: HBaseOperator.h:104
bool m_bOpStarted
Indicates whether the operator has already 'started'.
Definition: HBaseOperator.h:67
HCutGeometryVisibility m_TempCutGeometryVisibility
stores original cut geometry visibility
Definition: HBaseOperator.h:83
int m_doRepeat
Integer indicating if the operator is repeatable . This parameter has been deprecated.
Definition: HBaseOperator.h:68
HPoint const GetNewPoint()
Returns the current selection point.
Definition: HBaseOperator.h:101
HPoint m_ptNew
Current selection point.
Definition: HBaseOperator.h:72
HShadowMode m_TempShadowMode
stores original shadow mode
Definition: HBaseOperator.h:82
HCutGeometryVisibility
Definition: HGlobals.h:102
void SetFirstPoint(HPoint const &new_point)
Sets the initial selection point.
Definition: HBaseOperator.h:97
int Repeat()
Returns whether the operation is repeatable. This method has been deprecated.
Definition: HBaseOperator.h:86
void SetMapTouchesToMouseEvents(bool val)
Touch Events are mapped to mouse events if true, and are not if false.
Definition: HBaseOperator.h:109
The HDB class serves as a wrapper/utility class to manage an instance of the HOOPS/3dGS scene-graph...
Definition: HDB.h:32
void SetOperatorStarted(bool val)
Operator has been started if true, and has not been started if false.
Definition: HBaseOperator.h:107
The event has been handled.
Definition: HBaseOperator.h:42
The HBaseModel class is used to store and manage model information.
Definition: HBaseModel.h:47
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 Capture()
Returns whether we are currently in mouse capture mode. See this class' constructor for a more detail...
Definition: HBaseOperator.h:87
HBaseView * GetView()
Returns a pointer to the view that this operator is associated with.
Definition: HBaseOperator.h:103
void SetNewPoint(HPoint const &new_point)
Sets the current selection point.
Definition: HBaseOperator.h:100
int m_doCapture
Integer indicating whether to capture mouse on button down and release on button up. This parameter has been deprecated.
Definition: HBaseOperator.h:69
The HEventInfo class stores and manages event information.
Definition: HEventInfo.h:207
HShadowMode
Definition: HGlobals.h:92
HOperatorReturn
Definition: HBaseOperator.h:40
HPoint const GetFirstPoint()
Returns the initial selection point.
Definition: HBaseOperator.h:98
Processing was aborted.
Definition: HBaseOperator.h:44
bool m_bMapTouchesToMouseEvents
Indicates if touch events are mapped to mouse events.
Definition: HBaseOperator.h:76
The event has not been handled.
Definition: HBaseOperator.h:43