84 using InputFrame::InputFrame;
105 struct DistanceIndicator {
109 Color unsuffFuelColor;
110 Color outOfRangeColor;
113 struct SystemLabels {
116 DistanceIndicator distance;
121 void DrawNearSectors(
const matrix4x4f &modelview);
122 void DrawNearSector(
const int sx,
const int sy,
const int sz,
const matrix4x4f &trans);
125 void DrawFarSectors(
const matrix4x4f &modelview);
127 void PutFactionLabels(
const vector3f &secPos);
137 void MouseWheel(
bool up);
149 float m_rotXDefault, m_rotZDefault, m_zoomDefault;
151 float m_rotX, m_rotZ;
152 float m_rotXMovingTo, m_rotZMovingTo;
156 float m_zoomMovingTo;
158 bool m_rotateWithMouseButton =
false;
159 bool m_rotateView =
false;
160 bool m_zoomView =
false;
161 bool m_manualMove =
false;
164 bool m_automaticSystemSelection;
166 bool m_drawUninhabitedLabels;
167 bool m_drawOutRangeLabels;
168 bool m_drawVerticalLines;
170 std::unique_ptr<Graphics::Drawables::Disk> m_disk;
174 std::set<const Faction *> m_visibleFactions;
175 std::set<const Faction *> m_hiddenFactions;
177 Uint8 m_detailBoxVisible;
181 sigc::connection m_onMouseWheelCon;
182 sigc::connection m_onToggleSelectionFollowView;
183 sigc::connection m_onWarpToCurrent;
184 sigc::connection m_onWarpToSelected;
185 sigc::connection m_onViewReset;
188 std::string m_previousSearch;
190 float m_playerHyperspaceRange;
196 std::vector<SystemPath> m_route;
198 bool m_drawRouteLines;
199 bool m_setupRouteLines;
201 void SetupRouteLines(
const vector3f &playerAbsPos);
202 void GetPlayerPosAndStarSize(
vector3f &playerPosOut,
float ¤tStarSizeOut);
210 std::vector<vector3f> m_farstars;
211 std::vector<Color> m_farstarsColor;
215 bool m_toggledFaction;
224 std::unique_ptr<Graphics::VertexArray> m_lineVerts;
225 std::unique_ptr<Graphics::VertexArray> m_secLineVerts;
227 std::unique_ptr<Graphics::Drawables::Sphere3D> m_jumpSphere;
228 std::unique_ptr<Graphics::VertexArray> m_starVerts;
nlohmann::json Json
Definition: Json.h:8
Definition: DeleteEmitter.h:16
Definition: Factions.h:21
Definition: Drawables.h:56
Definition: Drawables.h:79
Definition: Drawables.h:114
Definition: RenderState.h:25
Definition: GuiLabelSet.h:15
Definition: GuiLabel.h:17
Definition: PiGuiView.h:11
Definition: RefCounted.h:36
Definition: SectorView.h:25
void SetHyperspaceTarget(const SystemPath &path)
Definition: SectorView.cpp:509
~SectorView() override
Definition: SectorView.cpp:386
SectorView::InputBinding InputBindings
void GotoSystem(const SystemPath &path)
Definition: SectorView.cpp:535
sigc::signal< void > onHyperspaceTargetChanged
Definition: SectorView.h:49
double GetZoomLevel() const
Definition: SectorView.cpp:1467
void SetDrawRouteLines(bool value)
Definition: SectorView.h:77
const std::string AutoRoute(const SystemPath &start, const SystemPath &target, std::vector< SystemPath > &outRoute) const
Definition: SectorView.cpp:819
void ZoomIn()
Definition: SectorView.cpp:1472
void SwitchToPath(const SystemPath &path)
Definition: SectorView.cpp:570
vector3f GetCenterSector()
Definition: SectorView.cpp:1490
std::vector< SystemPath > GetRoute()
Definition: SectorView.cpp:814
double GetCenterDistance()
Definition: SectorView.cpp:1495
SectorView(Game *game)
Definition: SectorView.cpp:233
bool MoveRouteItemDown(const std::vector< SystemPath >::size_type element)
Definition: SectorView.cpp:775
void OnSwitchFrom() override
Definition: SectorView.cpp:1286
void ShowAll() override
Definition: SectorView.cpp:1416
const std::set< const Faction * > & GetVisibleFactions()
Definition: SectorView.h:61
void ResetHyperspaceTarget()
Definition: SectorView.cpp:515
void UpdateRouteItem(const std::vector< SystemPath >::size_type element, const SystemPath &path)
Definition: SectorView.cpp:785
void ResetView()
Definition: SectorView.cpp:1562
void Update() override
Definition: SectorView.cpp:1291
void SaveToJson(Json &jsonObj) override
Definition: SectorView.cpp:395
void SetDrawVerticalLines(bool value)
Definition: SectorView.h:57
bool MoveRouteItemUp(const std::vector< SystemPath >::size_type element)
Definition: SectorView.cpp:765
SystemPath GetCurrent() const
Definition: SectorView.h:35
void AddToRoute(const SystemPath &path)
Definition: SectorView.cpp:791
void SetAutomaticSystemSelection(bool value)
Definition: SectorView.h:59
vector3f GetPosition() const
Definition: SectorView.h:34
void GotoHyperspaceTarget()
Definition: SectorView.h:45
void OnSwitchTo() override
Definition: SectorView.cpp:1279
void GotoSelectedSystem()
Definition: SectorView.h:44
void GotoSector(const SystemPath &path)
Definition: SectorView.cpp:525
void GotoCurrentSystem()
Definition: SectorView.h:43
void SetDrawUninhabitedLabels(bool value)
Definition: SectorView.h:56
bool IsCenteredOn(const SystemPath &path)
Definition: SectorView.cpp:549
SystemPath GetSelected() const
Definition: SectorView.h:36
void ZoomOut()
Definition: SectorView.cpp:1481
std::vector< SystemPath > GetNearbyStarSystemsByName(std::string pattern)
Definition: SectorView.cpp:1505
void Draw3D() override
Definition: SectorView.cpp:425
const std::set< const Faction * > & GetHiddenFactions()
Definition: SectorView.h:62
void SetDrawOutRangeLabels(bool value)
Definition: SectorView.h:58
void SetFactionVisible(const Faction *faction, bool visible)
Definition: SectorView.cpp:1535
SystemPath GetHyperspaceTarget() const
Definition: SectorView.h:38
bool RemoveRouteItem(const std::vector< SystemPath >::size_type element)
Definition: SectorView.cpp:797
void ClearRoute()
Definition: SectorView.cpp:808
void SetRotateMode(bool enable)
Definition: SectorView.cpp:1553
void SetZoomMode(bool enable)
Definition: SectorView.cpp:1544
Definition: SystemPath.h:13
Definition: Background.h:13