Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DistanceMeasureControl.hh
1 #ifndef __DistanceMeasureControl_HH__
2 #define __DistanceMeasureControl_HH__
3 
4 #include <bias_config.h>
5 
6 #ifndef BIAS_HAVE_OPENGL
7 # error You need BIAS with USE_OpenGL Please recompile BIAS.
8 #endif // BUILD_GLviewer
9 
10 
11 #ifdef BIAS_HAVE_FONTGL
12 #include <Base/Common/BIASpragmaStart.hh>
13 #include <Utils/DrawTextGL.hh>
14 #include <Base/Common/BIASpragmaEnd.hh>
15 #endif
16 
17 #include <Base/Math/Vector3.hh>
18 #include <GLviewer/Controller/TrackballControl.hh>
19 #include <GLviewer/Scenes/SceneBase.hh>
20 
21 namespace BIAS {
22  /**
23  \class DistanceMeasureControl
24  \author Ingo Schiller
25  \date 02/2010
26  \ingroup g_glviewer
27  \brief class for distance measurements in 3d model, derives from TrackballControl and SceneBase
28  */
29  class BIASGLviewer_EXPORT DistanceMeasureControl : public TrackballControl, public SceneBase
30  {
31  public:
34 
35 
36  /**
37  * @brief Sets first or second click measurement positions
38  */
39  bool LeftMouseDoubleClicked(int x, int y, int m);
40 
41  /**
42  * @brief Sets intermediate coords
43  */
44  bool MouseMoved(int x, int y);
45 
46  /**
47  * @brief Activate or deactivate distance measurement
48  * @param [in] bool on, activates or deactivates distance measurement
49  */
50  void SetDistanceMeasure(bool on);
51 
52  /**
53  * @brief Return if the measurement mode is activated
54  */
55  bool GetDistanceMeasure();
56 
57  /**
58  * @brief overloaded method from SceneBase. Here the line in 3D is drawn.
59  */
60  virtual void Draw();
61 
62  protected:
64  unsigned dNumClick_;
66  int x_,y_;
68 
69 #ifdef BIAS_HAVE_FONTGL
71 #endif
72 
73  };
74 }//end of namespace
75 #endif //__TrackballControl_HH__
class for distance measurements in 3d model, derives from TrackballControl and SceneBase ...
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
Definition: HomgPoint3D.hh:61
Base class for all scenes.
Definition: SceneBase.hh:68
class for camera movement in trackball mode.
Draw text to OpenGL as 2D bitmap font.
Definition: DrawTextGL.hh:71