1
+ import enum
1
2
import datetime
2
3
import math
3
4
import os
@@ -154,11 +155,11 @@ def build_tile_list(tile,list_lat_lon,do_osm,do_mesh,do_mask,do_dsf,do_ovl,do_pt
154
155
wall_time = time .clock ()
155
156
UI .lvprint (0 ,"Auto-generating a list of ZL zones around the airports of each tile." )
156
157
zone_lists = smart_zone_list (list_lat_lon = list_lat_lon ,
157
- screen_res = 2560 ,
158
+ screen_res = ScreenRes . OcculusRift ,
158
159
fov = 60 ,
159
160
fpa = 10 ,
160
161
provider = 'GO2' ,
161
- max_zl = 20 ,
162
+ max_zl = 19 ,
162
163
min_zl = 16 ,
163
164
greediness = 3 ,
164
165
greediness_threshold = 0.70 )
@@ -214,6 +215,21 @@ def remove_unwanted_textures(tile):
214
215
except :pass
215
216
##############################################################################
216
217
218
+
219
+ class ScreenRes (enum .Enum ):
220
+ _720p = (1280 , 720 )
221
+ SD = _720p
222
+ _1080p = (1920 , 1080 )
223
+ HD = _1080p
224
+ _1440p = (2560 , 1440 )
225
+ QHD = _1440p
226
+ _2160p = (3840 , 2160 )
227
+ _4K = _2160p
228
+ _4320p = (7680 , 4320 )
229
+ _8K = _4320p
230
+ OcculusRift = (1080 , 1200 ) # Per eye
231
+
232
+
217
233
def smart_zone_list (list_lat_lon , screen_res , fov , fpa , provider , max_zl , min_zl , greediness = 1 , greediness_threshold = 0.70 ):
218
234
tiles_to_build = [XPlaneTile (lat , lon ) for (lat , lon ) in list_lat_lon ]
219
235
airport_collection = AirportDataSource ().airports_in (tiles_to_build , include_surrounding_tiles = True )
@@ -225,7 +241,7 @@ def smart_zone_list(list_lat_lon, screen_res, fov, fpa, provider, max_zl, min_zl
225
241
for zl in range (max_zl , min_zl - 1 , - 1 ):
226
242
for polygon in airport_collection .polygons (zl ,
227
243
max_zl ,
228
- screen_res ,
244
+ screen_res . value [ 0 ] if isinstance ( screen_res , ScreenRes ) else screen_res ,
229
245
fov ,
230
246
fpa ,
231
247
greediness ,
0 commit comments