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