1 #ifndef INTERFACE_NAVIGATION_GUI_H 2 #define INTERFACE_NAVIGATION_GUI_H 4 #include "GenericGUI.h" 5 #include <KrisLibrary/math3d/geometry3d.h> 6 #include <KrisLibrary/camera/viewport.h> 7 #include <KrisLibrary/Timer.h> 18 virtual bool OnMouseClick(
int button,
int state,
int mx,
int my);
19 virtual bool OnMouseMove(
int mx,
int my);
20 virtual bool OnKeyDown(
const string& key);
21 virtual bool OnKeyUp(
const string& key);
23 virtual void BeginDrag(
int x,
int y,
int button,
int modifiers) {}
24 virtual void DoDrag(
int dx,
int dy,
int button,
int modifiers);
25 virtual void EndDrag(
int x,
int y,
int button,
int modifiers) {}
37 int oldmousex,oldmousey;
38 int clickButton, clickModifiers;
57 virtual void SetWorldLights() {}
58 virtual void RenderWorld() {}
59 virtual void RenderScreen() {}
62 virtual bool OnIdle();
63 virtual bool OnGLRender();
64 virtual bool OnGLViewport(
int x,
int y,
int w,
int h);
65 virtual bool OnMouseWheel(
int dwheel);
66 virtual bool OnCommand(
const string& cmd,
const string& args);
68 virtual void BeginDrag(
int x,
int y,
int button,
int modifiers);
69 virtual void DoFreeDrag(
int dx,
int dy,
int button);
70 virtual void DoCtrlDrag(
int dx,
int dy,
int button);
71 virtual void DoAltDrag(
int dx,
int dy,
int button);
74 void DragPan(
int dx,
int dy);
75 void DragRotate(
int dx,
int dy);
76 void DragZoom(
int dx,
int dy);
77 void DragTruck(
int dx,
int dy);
79 void Set2DMode(
bool mode=
true);
80 void DisplayCameraTarget();
81 void CenterCameraOn(
const Math3D::AABB3D& bbox);
82 void ClickRay(
int x,
int y,Math3D::Vector3& src,Math3D::Vector3& dir)
const;
84 void WriteDisplaySettings(std::ostream& out)
const;
85 void ReadDisplaySettings(std::istream& in);
87 Camera::Viewport viewport;
88 Camera::CameraController_Orbit camera;
92 int show_view_target;
float t_hide_view_target;
93 float frames_per_second;
bool show_frames_per_second;
98 #endif //INTERFACE_NAVIGATION_GUI_H virtual void DoPassiveMouseMove(int x, int y)
Overload this to handle plain, non-dragging mouse motion events.
Definition: NavigationGUI.h:35
virtual void DoFreeDrag(int dx, int dy, int button)
Overload this for regular (non-modified) dragging.
Definition: NavigationGUI.h:27
virtual void DoShiftDrag(int dx, int dy, int button)
Overload this for shift-dragging.
Definition: NavigationGUI.h:33
virtual void DoAltDrag(int dx, int dy, int button)
Overload this for alt-dragging.
Definition: NavigationGUI.h:31
A backend that processes mouse motion calls into dragging callbacks. Makes it a bit easier to determi...
Definition: NavigationGUI.h:13
Definition: GenericGUI.h:84
virtual void Start()
Default implementation of following do nothing.
Definition: GenericGUI.h:90
A backend that manages a camera and performs OpenGL scene management.
Definition: NavigationGUI.h:49
virtual void DoCtrlDrag(int dx, int dy, int button)
Overload this for control-dragging.
Definition: NavigationGUI.h:29