Choreonoid  1.8
SceneWidgetEvent.h
Go to the documentation of this file.
1 
5 #ifndef CNOID_BASE_SCENE_WIDGET_EVENT_H
6 #define CNOID_BASE_SCENE_WIDGET_EVENT_H
7 
8 #include <cnoid/SceneGraph>
9 #include "exportdecl.h"
10 
11 namespace cnoid {
12 
13 class SceneWidget;
14 
15 class CNOID_EXPORT SceneWidgetEvent
16 {
17 public:
19 
20  const Vector3& point() const { return point_; }
21 
22  const SgNodePath& nodePath() const { return nodePath_; }
23 
24  // OpenGL viewport coordinate
25  double x() const { return x_; }
26  double y() const { return y_; }
27 
28  double pixelSizeRatio() const { return pixelSizeRatio_; }
29 
33  int key() const { return key_; }
34 
38  int button() const { return button_; }
39 
43  int modifiers() const { return modifiers_; }
44 
45  double wheelSteps() const { return wheelSteps_; }
46 
47  const SgCamera* camera() const;
48  int cameraIndex() const { return cameraIndex_; }
49  const SgNodePath& cameraPath() const { return cameraPath_; }
50  const Isometry3& cameraPosition() const;
51  [[deprecated("Use cameraPosition")]]
52  const Isometry3& currentCameraPosition() const;
53  bool getRay(Vector3& out_origin, Vector3& out_direction) const;
54 
55  SceneWidget* sceneWidget() const { return sceneWidget_; }
56 
57  void updateIndicator(const std::string& message) const;
58 
59 private:
60  int key_;
61  int button_;
62  int modifiers_;
63  Vector3 point_;
64  double x_;
65  double y_;
66  double pixelSizeRatio_;
67  double wheelSteps_;
68  SgNodePath nodePath_;
69  int cameraIndex_;
70  SgNodePath cameraPath_;
71  mutable SceneWidget* sceneWidget_;
72 
74  SceneWidgetEvent& operator=(const SceneWidgetEvent& org); // disabled
75 
76  friend class SceneWidget;
77 };
78 
79 }
80 
81 #endif
cnoid::SceneWidgetEvent::wheelSteps
double wheelSteps() const
Definition: SceneWidgetEvent.h:45
cnoid::SceneWidgetEvent::key
int key() const
Definition: SceneWidgetEvent.h:33
cnoid::Vector3
Eigen::Vector3d Vector3
Definition: EigenTypes.h:57
cnoid::Isometry3
Eigen::Isometry3d Isometry3
Definition: EigenTypes.h:73
cnoid::SceneWidgetEvent::pixelSizeRatio
double pixelSizeRatio() const
Definition: SceneWidgetEvent.h:28
cnoid::SgCamera
Definition: SceneCameras.h:14
cnoid::SceneWidgetEvent::sceneWidget
SceneWidget * sceneWidget() const
Definition: SceneWidgetEvent.h:55
cnoid::SceneWidgetEvent::x
double x() const
Definition: SceneWidgetEvent.h:25
cnoid::SceneWidgetEvent::cameraPath
const SgNodePath & cameraPath() const
Definition: SceneWidgetEvent.h:49
cnoid::SceneWidgetEvent
Definition: SceneWidgetEvent.h:15
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::SceneWidgetEvent::nodePath
const SgNodePath & nodePath() const
Definition: SceneWidgetEvent.h:22
cnoid::SceneWidgetEvent::y
double y() const
Definition: SceneWidgetEvent.h:26
cnoid::SceneWidgetEvent::modifiers
int modifiers() const
Definition: SceneWidgetEvent.h:43
cnoid::SgNodePath
std::vector< SgNode * > SgNodePath
Definition: SceneGraph.h:24
cnoid::SceneWidgetEvent::cameraIndex
int cameraIndex() const
Definition: SceneWidgetEvent.h:48
cnoid::SceneWidget
Definition: SceneWidget.h:25
cnoid::SceneWidgetEvent::point
const Vector3 & point() const
Definition: SceneWidgetEvent.h:20
cnoid::SceneWidgetEvent::button
int button() const
Definition: SceneWidgetEvent.h:38