HTCObjectRotate.h
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 #ifndef _H_HTCOR_H
11 #define _H_HTCOR_H
12 
13 #ifdef H_PACK_8
14 #pragma pack(push)
15 #pragma pack(8)
16 #endif
17 
18 
19 #include "HTools.h"
20 #include "HBaseOperator.h"
21 #include "HTManager.h"
22 
24 enum HTCOR_State {
25  HTCOR_Resting,
26  HTCOR_Animating
27 };
28 
29 
33 class MVO_API HTCObjectRotate : public HBaseOperator, public HTClient
34 {
35 public:
37  HTCObjectRotate (HBaseView* view, int DoRepeat=0, int DoCapture=1);
40  ~HTCObjectRotate();
41  int OnLButtonDown (HEventInfo &hevent);
42  bool Tick( float request_time, float actual_time );
43  void SetDeleteOnUnRegister() { m_delete_on_unregister = true; }
44  void UnRegister ();
45  bool OnSignal( int signal );
47 protected:
48  int m_state;
49  float m_angle;
50  float m_duration;
51  float m_start_time;
52  HC_KEY m_key;
53  HC_KEY m_segkey;
57  float m_original_matrix[16];
58  int m_cookie;
60 private:
66  void RotateSegmentLocally ( HC_KEY key, HPoint *axis, HPoint *centroid, float theta );
71  bool GetSelection( HEventInfo &hevent, HC_KEY *key );
75  void Animate( HC_KEY key );
78  bool SearchAndDestroyHTCOR( HC_KEY key );
83  static bool signal_callback( int hevent, void * signal_data, void *user_data );
84 };
85 
86 
87 #ifdef H_PACK_8
88 #pragma pack(pop)
89 #endif
90 
91 #endif
92 
93 
94 
95 
float m_start_time
Definition: HTCObjectRotate.h:51
HPoint m_centroid
Definition: HTCObjectRotate.h:54
HC_KEY m_key
Definition: HTCObjectRotate.h:52
int m_state
Definition: HTCObjectRotate.h:48
Definition: HTManager.h:157
void SetDeleteOnUnRegister()
Definition: HTCObjectRotate.h:43
bool m_delete_on_unregister
Definition: HTCObjectRotate.h:55
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
Definition: HTCObjectRotate.h:33
int m_cookie
Definition: HTCObjectRotate.h:58
The HEventInfo class stores and manages event information.
Definition: HEventInfo.h:207
virtual bool Tick(float request_time, float actual_time)
Definition: HTManager.h:186
virtual int OnLButtonDown(HEventInfo &hevent)
HC_KEY m_segkey
Definition: HTCObjectRotate.h:53
bool m_original_matrix_valid
Definition: HTCObjectRotate.h:56
float m_angle
Definition: HTCObjectRotate.h:49
float m_duration
Definition: HTCObjectRotate.h:50