Pioneer
ObjectViewerView.h
Go to the documentation of this file.
1 // Copyright © 2008-2021 Pioneer Developers. See AUTHORS.txt for details
2 // Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3 
4 #ifndef _OBJECTVIEWERVIEW_H
5 #define _OBJECTVIEWERVIEW_H
6 
7 #include "Camera.h"
8 #include "gui/Gui.h"
9 #include "libs.h"
10 #include "pigui/PiGuiView.h"
11 
12 class Body;
13 class SystemBody;
14 
15 class ObjectViewerView : public PiGuiView {
16 public:
18  virtual void Update() override;
19  virtual void Draw3D() override;
20 
21 protected:
22  virtual void OnSwitchTo() override;
23 
24  virtual void DrawPiGui() override;
25 
26 private:
27  void ReloadState();
28  void OnChangeTerrain();
29 
30  void DrawInfoWindow();
31  void DrawControlsWindow();
32 
33  Body *m_targetBody;
34  const SystemBody *m_systemBody;
35  bool m_isTerrainBody;
36 
37  struct ControlState {
38  uint32_t seed;
39  double mass;
40  double radius;
41  double life;
42  double volatileGas;
43  double volatileIces;
44  double volatileLiquid;
45  double metallicity;
46  double volcanicity;
47  } m_state;
48 
49  float viewingDist;
50  matrix4x4d m_camRot;
51 
52  RefCountedPtr<CameraContext> m_cameraContext;
53  std::unique_ptr<Camera> m_camera;
54 };
55 
56 #endif /* _OBJECTVIEWERVIEW_H */
Definition: Body.h:54
Definition: ObjectViewerView.h:15
virtual void Draw3D() override
virtual void DrawPiGui() override
virtual void Update() override
virtual void OnSwitchTo() override
Definition: PiGuiView.h:11
Definition: SystemBody.h:19