Klamp't  0.8.1
WorldDragWidget.h
1 #ifndef WORLD_DRAG_WIDGET
2 #define WORLD_DRAG_WIDGET
3 
4 #include <KrisLibrary/GLdraw/Widget.h>
6 
7 class WorldDragWidget : public GLDraw::Widget
8 {
9 public:
10  WorldDragWidget(RobotWorld* world=NULL);
11  virtual ~WorldDragWidget() {}
12  void Set(RobotWorld* world);
13  void Enable(bool active);
14  virtual void SetHighlight(bool value);
15  virtual bool Hover(int x,int y,Camera::Viewport& viewport,double& distance);
16  virtual bool BeginDrag(int x,int y,Camera::Viewport& viewport,double& distance);
17  virtual void EndDrag();
18  virtual void Drag(int dx,int dy,Camera::Viewport& viewport);
19  virtual void DrawGL(Camera::Viewport& viewport);
20 
21  RobotWorld* world;
22  bool active;
23  bool robotsActive,objectsActive,terrainsActive;
24  GLDraw::GLColor highlightColor,lineColor;
25  float lineWidth;
26  bool dragging;
27  int hoverID;
28  Vector3 hoverPt;
29  Vector3 dragPt;
30  Real hoverDistance;
31 
32  int highlightID;
33  GLDraw::GLColor originalFaceColor;
34 };
35 
36 #endif
The main world class containing multiple robots, objects, and static geometries (terrains). Lights and other viewport information may also be stored here.
Definition: World.h:20
Definition: WorldDragWidget.h:7