149 using InputFrame::InputFrame;
150 void RegisterBindings()
override;
157 void DrawOrreryView();
158 void DrawAtlasView();
163 template <
typename RefType>
164 void PutOrbit(
Projectable::bases base, RefType *ref,
const Orbit *orb,
const vector3d &offset,
const Color &color,
const double planetRadius = 0.0,
const bool showLagrange =
false);
168 void MouseWheel(
bool up);
169 void RefreshShips(
void);
170 void DrawShips(
const double t,
const vector3d &offset);
173 void DrawGrid(uint32_t radius);
176 template <
typename T>
178 void CalculateShipPositionAtTime(
const Ship *s,
Orbit o,
double t,
vector3d &pos);
179 void CalculateFramePositionAtTime(
FrameId frameId,
double t,
vector3d &pos);
180 double GetOrbitTime(
double t,
const SystemBody *b);
181 double GetOrbitTime(
double t,
const Body *b);
188 std::vector<Projectable> m_projected;
189 std::vector<SystemBody *> m_displayed_sbody;
191 bool m_viewingCurrentSystem;
192 std::list<std::pair<Ship *, Orbit>> m_contacts;
202 bool m_rotateWithMouseButton =
false;
203 bool m_rotateView =
false;
204 bool m_zoomView =
false;
205 const float CAMERA_FOV = 50.f;
206 const float CAMERA_FOV_RADIANS = CAMERA_FOV / 57.295779f;
209 float m_rot_x, m_rot_y;
210 float m_rot_x_to, m_rot_y_to;
211 float m_zoom, m_zoomTo;
212 float m_atlasZoom, m_atlasZoomTo, m_atlasZoomDefault;
213 vector2f m_atlasPos, m_atlasPosTo, m_atlasPosDefault;
214 float m_atlasViewW, m_atlasViewH;
215 int m_animateTransition;
222 sigc::connection m_onMouseWheelCon;
224 std::unique_ptr<Graphics::Drawables::Disk> m_bodyIcon;
225 std::unique_ptr<Graphics::Material> m_bodyMat;
226 std::unique_ptr<Graphics::Material> m_atlasMat;
227 std::unique_ptr<Graphics::Material> m_lineMat;
228 std::unique_ptr<Graphics::Material> m_gridMat;
232 std::unique_ptr<vector3f[]> m_orbitVts;
233 std::unique_ptr<Color[]> m_orbitColors;
235 std::unique_ptr<Graphics::VertexArray> m_lineVerts;
ShowLagrange
Definition: SystemView.h:37
@ LAG_ICONTEXT
Definition: SystemView.h:39
@ LAG_ICON
Definition: SystemView.h:38
@ LAG_OFF
Definition: SystemView.h:40
ShipDrawing
Definition: SystemView.h:25
@ ORBITS
Definition: SystemView.h:27
@ BOXES
Definition: SystemView.h:26
@ OFF
Definition: SystemView.h:28
GridDrawing
Definition: SystemView.h:31
Definition: DeleteEmitter.h:16
Definition: Drawables.h:80
Definition: PiGuiView.h:11
Definition: StarSystem.h:27
Definition: SystemBody.h:19
Definition: SystemView.h:92
void ViewSelectedObject()
Definition: SystemView.cpp:964
Projectable * GetSelectedObject()
Definition: SystemView.cpp:940
void SetDisplayMode(Mode displayMode)
Definition: SystemView.h:130
void Draw3D() override
Definition: SystemView.cpp:368
void ClearSelectedObject()
Definition: SystemView.cpp:959
RefCountedPtr< StarSystem > GetCurrentSystem()
Definition: SystemView.cpp:154
Color svColor[8]
Definition: SystemView.h:144
~SystemView() override
Definition: SystemView.cpp:105
std::vector< Projectable > GetProjected() const
Definition: SystemView.h:119
Mode GetDisplayMode()
Definition: SystemView.h:129
void SetSelectedObject(Projectable::types type, Projectable::bases base, SystemBody *sb)
Definition: SystemView.cpp:945
double ProjectedSize(double size, vector3d pos)
Definition: SystemView.cpp:974
void SetRotateMode(bool enable)
Definition: SystemView.cpp:931
void OnSwitchFrom() override
Definition: SystemView.cpp:989
float AtlasViewPixelPerUnit()
Definition: SystemView.cpp:990
double GetOrbitPlannerTime() const
Definition: SystemView.h:116
double GetOrbitPlannerStartTime() const
Definition: SystemView.h:115
void Update() override
Definition: SystemView.cpp:705
void AccelerateTime(float step)
Definition: SystemView.cpp:111
void ResetViewpoint()
Definition: SystemView.cpp:122
Mode
Definition: SystemView.h:94
float GetZoom() const
Definition: SystemView.cpp:982
void SetRealTime()
Definition: SystemView.cpp:117
void SetVisibility(std::string param)
Definition: SystemView.cpp:891
SystemView(Game *game)
Definition: SystemView.cpp:60
void SetZoomMode(bool enable)
Definition: SystemView.cpp:922
TransferPlanner * GetTransferPlanner() const
Definition: SystemView.h:114
void SetColor(ColorIndex color_index, Color *color_value)
Definition: SystemView.h:145
float AtlasViewPlanetGap(float planetRadius)
Definition: SystemView.h:124
ColorIndex
Definition: SystemView.h:133
@ GRID_LEG
Definition: SystemView.h:135
@ GRID
Definition: SystemView.h:134
@ SELECTED_SHIP_ORBIT
Definition: SystemView.h:140
@ SYSTEMBODY_ORBIT
Definition: SystemView.h:137
@ PLAYER_ORBIT
Definition: SystemView.h:138
@ PLANNER_ORBIT
Definition: SystemView.h:139
@ SYSTEMBODY
Definition: SystemView.h:136
@ SHIP_ORBIT
Definition: SystemView.h:141
Definition: TransferPlanner.h:8
double GetStartTime() const
Definition: TransferPlanner.cpp:71
Definition: SystemView.h:81
float radius
Definition: SystemView.h:83
SystemBody * body
Definition: SystemView.h:82
vector2f size
Definition: SystemView.h:87
bool isVertical
Definition: SystemView.h:84
vector2f offset
Definition: SystemView.h:86
bool isBinary
Definition: SystemView.h:85
std::vector< AtlasBodyLayout > children
Definition: SystemView.h:89
Definition: SystemView.h:43
enum Projectable::bases base
Projectable(const types t, const bases b, const Body *obj)
Definition: SystemView.h:67
vector3d screenpos
Definition: SystemView.h:63
const SystemBody * sbody
Definition: SystemView.h:61
const Body * body
Definition: SystemView.h:60
bases
Definition: SystemView.h:52
@ BODY
Definition: SystemView.h:54
@ SHIP
Definition: SystemView.h:55
@ PLAYER
Definition: SystemView.h:56
@ PLANNER
Definition: SystemView.h:57
@ SYSTEMBODY
Definition: SystemView.h:53
Projectable(const types t, const bases b, const SystemBody *obj)
Definition: SystemView.h:72
float screensize
Definition: SystemView.h:65
Projectable()
Definition: SystemView.h:77
types
Definition: SystemView.h:44
@ L5
Definition: SystemView.h:48
@ L4
Definition: SystemView.h:47
@ PERIAPSIS
Definition: SystemView.h:50
@ OBJECT
Definition: SystemView.h:46
@ APOAPSIS
Definition: SystemView.h:49
@ NONE
Definition: SystemView.h:45
vector3d worldpos
Definition: SystemView.h:64
union Projectable::@9 ref
enum Projectable::types type