fix bases for non-full-level rendering or ramps
This commit is contained in:
parent
dcb0edcbd8
commit
25794fb613
2 changed files with 27 additions and 7 deletions
|
@ -88,10 +88,14 @@ class MapRenderer:
|
|||
|
||||
not_full_levels = not self.full_levels and engine.is_3d
|
||||
full_levels = self.full_levels and engine.is_3d
|
||||
for geoms in levels:
|
||||
for i, geoms in reversed(tuple(enumerate(reversed(levels)))):
|
||||
if not bbox.intersects(geoms.affected_area):
|
||||
continue
|
||||
|
||||
if i == 0:
|
||||
not_full_levels = True
|
||||
full_levels = False
|
||||
|
||||
engine.add_group('level_%s' % geoms.short_label)
|
||||
|
||||
# hide indoor and outdoor rooms if their access restriction was not unlocked
|
||||
|
@ -108,11 +112,12 @@ class MapRenderer:
|
|||
offset=min_altitude-int(0.7*1000)),
|
||||
fill=FillAttribs('#aaaaaa'), category='walls')
|
||||
for i, altitudearea in enumerate(geoms.altitudeareas):
|
||||
scale = (altitudearea.altitude - min_altitude) / int(0.7 * 1000)
|
||||
offset = (min_altitude - int(0.7*1000)) - (altitudearea.altitude - int(0.7*1000)) * scale
|
||||
geometry = altitudearea.geometry.difference(crop_areas)
|
||||
engine.add_geometry(geometry.fit(scale=scale, offset=offset).filter(top=False),
|
||||
fill=FillAttribs('#eeeeee'), category='ground', item=i)
|
||||
base = altitudearea.base.difference(crop_areas)
|
||||
bottom = altitudearea.bottom.difference(crop_areas)
|
||||
engine.add_geometry(base, fill=FillAttribs('#eeeeee'), category='ground', item=i)
|
||||
engine.add_geometry(bottom.fit(scale=geoms.min_altitude - min_altitude,
|
||||
offset=min_altitude - int(0.7 * 1000)),
|
||||
fill=FillAttribs('#aaaaaa'), category='walls')
|
||||
|
||||
# render altitude areas in default ground color and add ground colors to each one afterwards
|
||||
# shadows are directly calculated and added by the engine
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue