Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TrackballTransControl.hh
1 #ifndef __TrackballTransControl_HH__
2 #define __TrackballTransControl_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 #include <GLviewer/Controller/TrackballBase.hh>
11 #include <GLviewer/Controller/TransformNode.hh>
12 
13 namespace BIAS
14 {
15 
16  /** @class TrackballTransControl
17  @author grauel
18  @ingroup g_glviewer
19  @brief class for editing scenegraph transform nodes in trackball mode
20  */
21  class BIASGLviewer_EXPORT TrackballTransControl : public TrackballBase
22  {
23 
24  public:
25 
27  virtual ~TrackballTransControl();
28 
29  bool RightMouseMoved(int x1, int x2, int y1, int y2);
30  void MoveInViewingDirection(double stepSize);
31 
32  /**
33  * Rotates the tranformed object
34  */
35  bool LeftMouseMoved(int x1, int x2, int y1, int y2);
36  void Rotate(BIAS::Vector3<double> axis, double angleRAD);
37 
38  /** should set point of interesr but is not supported by */
39  bool LeftMouseDoubleClicked(int x, int y);
40 
41  /** rotate around viewing direction */
42  bool LeftAndRightMouseMoved(int x1, int x2, int y1, int y2);
43 
44  /**
45  Handles Mouse Wheel events and zooms in or out
46  */
47  bool MouseWheelUsed(double stepsize);
48 
49  /**
50  * Moves the transform node left/right/up/down
51  */
52  bool MiddleMouseMoved(int x1, int x2, int y1, int y2);
53 
54  void RotateAroundViewingDirection(double rotationAngleRAD);
55 
57  {
58  TransNode_ = trn;
59  }
60  protected:
61 
62  // void Scale(BIAS::Vector3<double>);
63  void Translate_(BIAS::Vector3<double>& v);
64  void Rotate_(BIAS::Vector3<double>& axis,double rotationagle);
65 
67  };
68 }//end of namespace
69 
70 #endif
class for editing scenegraph transform nodes in trackball mode
interface for transformations edited by a TrackballTransController
functionality for editing cameras or transformations in trackball mode. parts of trackballcontroller ...
void SetTransformNode(TransformNode *trn)