1package com.fs.starfarer.api.ui;
4import java.util.ArrayList;
5import java.util.HashSet;
9import org.lwjgl.util.vector.Vector2f;
11import com.fs.starfarer.api.Global;
12import com.fs.starfarer.api.campaign.CampaignFleetAPI;
13import com.fs.starfarer.api.campaign.LocationAPI;
14import com.fs.starfarer.api.campaign.SectorEntityToken;
15import com.fs.starfarer.api.campaign.StarSystemAPI;
16import com.fs.starfarer.api.campaign.comm.IntelInfoPlugin;
17import com.fs.starfarer.api.campaign.comm.IntelInfoPlugin.ArrowData;
18import com.fs.starfarer.api.campaign.econ.MarketAPI;
19import com.fs.starfarer.api.impl.campaign.procgen.Constellation;
20import com.fs.starfarer.api.util.Misc;
62 filterData.starscape =
true;
63 filterData.names =
true;
87 Vector2f center =
new Vector2f();
91 if (showPlayerFleet) {
94 markers =
new ArrayList<MarkerData>();
102 Vector2f min =
new Vector2f();
103 Vector2f max =
new Vector2f();
106 Vector2f p = curr.getLocation();
107 min.x = Math.min(min.x, p.x);
108 min.y = Math.min(min.y, p.y);
109 max.x = Math.max(max.x, p.x);
110 max.y = Math.max(max.y, p.y);
112 Vector2f.add(center, p, center);
119 if (curr == playerMarker)
continue;
120 Vector2f p = curr.coordinates;
121 min.x = Math.min(min.x, p.x);
122 min.y = Math.min(min.y, p.y);
123 max.x = Math.max(max.x, p.x);
124 max.y = Math.max(max.y, p.y);
126 Vector2f.add(center, p, center);
132 center.scale(1f / total);
137 Vector2f diff = Vector2f.sub(max, min,
new Vector2f());
138 distance += diff.length() * 0.5f;
143 float maxShown = heightOnScreen;
145 float zoom = (float) (Math.ceil(distance / maxShown)) + 1;
146 if (zoom < 3) zoom = 3;
175 markers =
new ArrayList<MarkerData>();
static SectorAPI getSector()
boolean useFullAlphaForShownSystems
boolean smallConstellations
List< MarkerData > markers
void showSystem(StarSystemAPI system)
static final float GRID_SIZE_PIXELS
static final float GRID_SIZE_MAP_UNITS
void positionToShowAllMarkersAndSystems(boolean showPlayerFleet, float heightOnScreen)
Set< StarSystemAPI > showSystems
boolean skipCurrLocMarkerRendering
SectorEntityToken entityToShow
float starSelectionRadiusMult
float maxZoomMapSizePadding
void showMarket(MarketAPI market)
Set< Constellation > showConsellations
void showMarket(MarketAPI market, float scale)
static float getScaleForMarket(MarketAPI market)
static float getDistance(SectorEntityToken from, SectorEntityToken to)
static Vector2f interpolateVector(Vector2f from, Vector2f to, float progress)
static Color getDarkPlayerColor()
CampaignFleetAPI getPlayerFleet()
LocationAPI getHyperspace()
Vector2f getLocationInHyperspace()
boolean isPlanetConditionMarketOnly()
Vector2f getLocationInHyperspace()