HOpCameraOrbitTurntable.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 // HOpCameraOrbitTurntable.h : interface of the HOpCameraOrbitTurntable class
11 // pans the camera of current view
12 
13 #ifndef _HOpCameraOrbitTurntable_H
14 #define _HOpCameraOrbitTurntable_H
15 
16 #ifdef H_PACK_8
17 #pragma pack(push)
18 #pragma pack(8)
19 #endif
20 
21 #include "HTools.h"
22 #include "HBaseOperator.h"
23 
25 
39 class MVO_API HOpCameraOrbitTurntable : public HBaseOperator
40 {
41 public:
49  HOpCameraOrbitTurntable(HBaseView* view, int DoRepeat=0, int DoCapture=1);
50  virtual ~HOpCameraOrbitTurntable();
51 
55  virtual const char * GetName();
56 
62  virtual int OnLButtonDown (HEventInfo &hevent);
63 
70  virtual int OnLButtonDownAndMove(HEventInfo &hevent);
71 
77  virtual int OnLButtonUp (HEventInfo &hevent);
78 
84  virtual int OnMouseWheel (HEventInfo &hevent);
85 
92  void SetLightFollowsCamera(bool follow){m_LightFollowsCamera = follow;};
93 
95  bool GetLightFollowsCamera(){return m_LightFollowsCamera;};
100  void SetCenter(HPoint center) { m_Center = center; m_bCenterPointSet = true; }
105  void UnSetCenter() { m_bCenterPointSet = false; }
111  virtual HBaseOperator * Clone();
112 
113 protected:
114 
120  void RotateAroundAxis(HPoint axis, float rf);
121 
122 private:
123 
124 
125  bool m_LightFollowsCamera;
126  bool m_bDoOnce;
127  bool m_bCenterPointSet;
128  HPoint m_Center;
129 
130 };
131 
132 
133 #ifdef H_PACK_8
134 #pragma pack(pop)
135 #endif
136 
137 #endif
138 
139 
140 
141 
virtual int OnLButtonDownAndMove(HEventInfo &hevent)
virtual const char * GetName()
virtual int OnLButtonUp(HEventInfo &hevent)
void UnSetCenter()
Definition: HOpCameraOrbitTurntable.h:105
bool GetLightFollowsCamera()
Definition: HOpCameraOrbitTurntable.h:95
virtual HBaseOperator * Clone()
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
The HOpCameraOrbitTurntable class orbits the camera around a predefined vertical and horizontal axis...
Definition: HOpCameraOrbitTurntable.h:39
The HEventInfo class stores and manages event information.
Definition: HEventInfo.h:207
virtual int OnLButtonDown(HEventInfo &hevent)
void SetLightFollowsCamera(bool follow)
Definition: HOpCameraOrbitTurntable.h:92
virtual int OnMouseWheel(HEventInfo &hevent)
void SetCenter(HPoint center)
Definition: HOpCameraOrbitTurntable.h:100