87 Vector2f center =
new Vector2f();
91 if (showPlayerFleet) {
94 markers =
new ArrayList<MarkerData>();
96 playerMarker =
new MarkerData(player.getLocationInHyperspace(),
null,
null);
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);
136 float distance = Misc.getDistance(player.getLocationInHyperspace(), center);
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;
150 Vector2f loc = Misc.interpolateVector(
Global.
getSector().getPlayerFleet().getLocationInHyperspace(),