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;
163 bool m_automaticSystemSelection;
165 bool m_drawUninhabitedLabels;
166 bool m_drawOutRangeLabels;
167 bool m_drawVerticalLines;
169 std::unique_ptr<Graphics::Drawables::Disk> m_disk;
173 std::set<const Faction *> m_visibleFactions;
174 std::set<const Faction *> m_hiddenFactions;
176 Uint8 m_detailBoxVisible;
180 sigc::connection m_onMouseWheelCon;
181 sigc::connection m_onToggleSelectionFollowView;
182 sigc::connection m_onWarpToCurrent;
183 sigc::connection m_onWarpToSelected;
184 sigc::connection m_onViewReset;
187 std::string m_previousSearch;
189 float m_playerHyperspaceRange;
195 std::vector<SystemPath> m_route;
197 bool m_drawRouteLines;
198 bool m_setupRouteLines;
200 void SetupRouteLines(
const vector3f &playerAbsPos);
201 void GetPlayerPosAndStarSize(
vector3f &playerPosOut,
float ¤tStarSizeOut);
209 std::vector<vector3f> m_farstars;
210 std::vector<Color> m_farstarsColor;
214 bool m_toggledFaction;
223 std::unique_ptr<Graphics::VertexArray> m_lineVerts;
224 std::unique_ptr<Graphics::VertexArray> m_secLineVerts;
226 std::unique_ptr<Graphics::Drawables::Sphere3D> m_jumpSphere;
227 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:375
~SectorView() override
Definition: SectorView.cpp:250
SectorView::InputBinding InputBindings
void GotoSystem(const SystemPath &path)
Definition: SectorView.cpp:401
sigc::signal< void > onHyperspaceTargetChanged
Definition: SectorView.h:49
double GetZoomLevel() const
Definition: SectorView.cpp:1353
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:685
void ZoomIn()
Definition: SectorView.cpp:1358
void SwitchToPath(const SystemPath &path)
Definition: SectorView.cpp:436
vector3f GetCenterSector()
Definition: SectorView.cpp:1376
std::vector< SystemPath > GetRoute()
Definition: SectorView.cpp:680
double GetCenterDistance()
Definition: SectorView.cpp:1381
SectorView(Game *game)
Definition: SectorView.cpp:97
bool MoveRouteItemDown(const std::vector< SystemPath >::size_type element)
Definition: SectorView.cpp:641
void OnSwitchFrom() override
Definition: SectorView.cpp:1152
void ShowAll() override
Definition: SectorView.cpp:1302
const std::set< const Faction * > & GetVisibleFactions()
Definition: SectorView.h:61
void ResetHyperspaceTarget()
Definition: SectorView.cpp:381
void UpdateRouteItem(const std::vector< SystemPath >::size_type element, const SystemPath &path)
Definition: SectorView.cpp:651
void ResetView()
Definition: SectorView.cpp:1448
void Update() override
Definition: SectorView.cpp:1157
void SaveToJson(Json &jsonObj) override
Definition: SectorView.cpp:259
void SetDrawVerticalLines(bool value)
Definition: SectorView.h:57
bool MoveRouteItemUp(const std::vector< SystemPath >::size_type element)
Definition: SectorView.cpp:631
SystemPath GetCurrent() const
Definition: SectorView.h:35
void AddToRoute(const SystemPath &path)
Definition: SectorView.cpp:657
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:1145
void GotoSelectedSystem()
Definition: SectorView.h:44
void GotoSector(const SystemPath &path)
Definition: SectorView.cpp:391
void GotoCurrentSystem()
Definition: SectorView.h:43
void SetDrawUninhabitedLabels(bool value)
Definition: SectorView.h:56
bool IsCenteredOn(const SystemPath &path)
Definition: SectorView.cpp:415
SystemPath GetSelected() const
Definition: SectorView.h:36
void ZoomOut()
Definition: SectorView.cpp:1367
std::vector< SystemPath > GetNearbyStarSystemsByName(std::string pattern)
Definition: SectorView.cpp:1391
void Draw3D() override
Definition: SectorView.cpp:291
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:1421
SystemPath GetHyperspaceTarget() const
Definition: SectorView.h:38
bool RemoveRouteItem(const std::vector< SystemPath >::size_type element)
Definition: SectorView.cpp:663
void ClearRoute()
Definition: SectorView.cpp:674
void SetRotateMode(bool enable)
Definition: SectorView.cpp:1439
void SetZoomMode(bool enable)
Definition: SectorView.cpp:1430
Definition: SystemPath.h:13
Definition: Background.h:13