SPH
OrthoPane.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "gui/ArcBall.h"
4 #include "gui/Settings.h"
5 #include "gui/objects/Point.h"
8 
10 
11 class Controller;
12 class ICamera;
13 
14 class OrthoPane : public IGraphicsPane {
15 private:
16  Controller* controller;
17 
19  ArcBall arcBall;
20 
21  AutoPtr<ICamera> camera;
22 
23  struct {
26 
29  } dragging;
30 
31  struct {
33  } particle;
34 
35 public:
36  OrthoPane(wxWindow* parent, Controller* controller, const GuiSettings& gui);
37 
39 
40  virtual ICamera& getCamera() override {
41  return *camera;
42  }
43 
44  virtual void resetView() override;
45 
46  virtual void onTimeStep(const Storage& storage, const Statistics& stats) override;
47 
48 private:
50  void onPaint(wxPaintEvent& evt);
51 
52  void onMouseMotion(wxMouseEvent& evt);
53 
54  void onLeftUp(wxMouseEvent& evt);
55 
56  void onRightDown(wxMouseEvent& evt);
57 
58  void onRightUp(wxMouseEvent& evt);
59 
60  void onDoubleClick(wxMouseEvent& evt);
61 
62  void onMouseWheel(wxMouseEvent& evt);
63 
64  void onResize(wxSizeEvent& evt);
65 };
66 
Helper class for rotating objects by mouse drag.
NAMESPACE_SPH_BEGIN
Definition: BarnesHut.cpp:13
Base class for drawing particles into the window.
#define NAMESPACE_SPH_END
Definition: Object.h:12
Wrapper of type value of which may or may not be present.
static AffineMatrix identity()
Definition: AffineMatrix.h:132
Helper object providing rotation matrix based on mouse drag.
Definition: ArcBall.h:21
Main GUI class connection the simulation with UI controls.
Definition: Controller.h:42
Interface defining a camera or view, used by a renderer.
Definition: Camera.h:62
virtual void resetView() override
Definition: OrthoPane.cpp:40
virtual ICamera & getCamera() override
Definition: OrthoPane.h:40
Optional< Size > lastIdx
Definition: OrthoPane.h:32
OrthoPane(wxWindow *parent, Controller *controller, const GuiSettings &gui)
Definition: OrthoPane.cpp:16
Pixel position
Cached last mouse position when dragging the window.
Definition: OrthoPane.h:25
AffineMatrix initialMatrix
Camera rotation matrix when dragging started.
Definition: OrthoPane.h:28
virtual void onTimeStep(const Storage &storage, const Statistics &stats) override
Definition: OrthoPane.cpp:45
Object holding various statistics about current run.
Definition: Statistics.h:22
Container storing all quantities used within the simulations.
Definition: Storage.h:230
Simple 2D vector with integer coordinates. Provides conversion from and to wxPoint.
Definition: Point.h:101