HOpCameraZoomBox.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 // HOpCameraZoomBox.h : interface of the HOpCameraZoomBox class
11 // zooms the camera based on user-defined screen-space window
12 
13 #ifndef _HOPCAMERAZOOMBOX_H
14 #define _HOPCAMERAZOOMBOX_H
15 
16 #ifdef H_PACK_8
17 #pragma pack(push)
18 #pragma pack(8)
19 #endif
20 
21 #include "HTools.h"
22 #include "HOpConstructRectangle.h"
23 
25 
42 {
43 public:
51  HOpCameraZoomBox (HBaseView* view, int DoRepeat=0, int DoCapture=1);
52  virtual ~HOpCameraZoomBox();
53 
55  virtual const char * GetName();
56 
63  virtual int OnLButtonUp(HEventInfo &hevent);
64 
70  virtual int OnLButtonDblClk(HEventInfo &hevent);
71 
78  void SetLightFollowsCamera(bool follow){m_LightFollowsCamera = follow;};
79 
81  bool GetLightFollowsCamera(){return m_LightFollowsCamera;};
82 
88  virtual HBaseOperator * Clone();
89 
93  bool EnforceMinCameraSize() const
94  {
95  return m_enforceMinCameraSize;
96  }
97 
101  void SetEnforceMinCameraSize(bool enforceMinCameraSize)
102  {
103  m_enforceMinCameraSize = enforceMinCameraSize;
104  }
105 
106 
107 protected:
108  bool ComputeReasonableTarget(HPoint & new_tar, HPoint const & min, HPoint const & max, HPoint const & tar_orig);
109  void ComputeNewField(float & width, float & height,
110  HPoint min, HPoint max,
111  HPoint const & new_tar
112  );
113 
114  bool m_LightFollowsCamera;
115  bool m_enforceMinCameraSize;
116 };
117 
118 #ifdef H_PACK_8
119 #pragma pack(pop)
120 #endif
121 
122 #endif
123 
124 
125 
The HOpCameraZoomBox class zooms the camera to a selected area.
Definition: HOpCameraZoomBox.h:41
bool GetLightFollowsCamera()
Definition: HOpCameraZoomBox.h:81
virtual HBaseOperator * Clone()
bool EnforceMinCameraSize() const
Definition: HOpCameraZoomBox.h:93
void SetEnforceMinCameraSize(bool enforceMinCameraSize)
Definition: HOpCameraZoomBox.h:101
virtual int OnLButtonUp(HEventInfo &hevent)
void SetLightFollowsCamera(bool follow)
Definition: HOpCameraZoomBox.h:78
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
virtual const char * GetName()
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:332
virtual int OnLButtonDblClk(HEventInfo &hevent)
The HOpConstructRectangle class draws a rectangle.
Definition: HOpConstructRectangle.h:39
The HEventInfo class stores and manages event information.
Definition: HEventInfo.h:207