in render_full immediate levels now cast shadows
This commit is contained in:
parent
a1ed7534d9
commit
a54a85da3b
8 changed files with 54 additions and 17 deletions
|
@ -7,7 +7,8 @@ from shapely.geometry import JOIN_STYLE, Polygon
|
|||
|
||||
from c3nav.routing.graph.point import GraphPoint
|
||||
from c3nav.routing.graph.room import GraphRoom
|
||||
from c3nav.routing.utils.base import assert_multipolygon, get_nearest_point
|
||||
from c3nav.routing.utils.base import get_nearest_point
|
||||
from c3nav.mapdata.utils import assert_multipolygon
|
||||
from c3nav.routing.utils.draw import _ellipse_bbox, _line_coords
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ from matplotlib.path import Path
|
|||
from shapely.geometry import JOIN_STYLE, LineString
|
||||
|
||||
from c3nav.routing.graph.point import GraphPoint
|
||||
from c3nav.routing.utils.base import assert_multipolygon
|
||||
from c3nav.mapdata.utils import assert_multipolygon
|
||||
from c3nav.routing.utils.coords import get_coords_angles
|
||||
from c3nav.routing.utils.mpl import polygon_to_mpl_paths
|
||||
|
||||
|
|
|
@ -1,17 +1,6 @@
|
|||
from shapely.geometry import Polygon
|
||||
|
||||
|
||||
def assert_multipolygon(geometry):
|
||||
"""
|
||||
given a Polygon or a MultiPolygon, return a list of Polygons
|
||||
:param geometry: a Polygon or a MultiPolygon
|
||||
:return: a list of Polygons
|
||||
"""
|
||||
if isinstance(geometry, Polygon):
|
||||
polygons = [geometry]
|
||||
else:
|
||||
polygons = geometry.geoms
|
||||
return polygons
|
||||
from c3nav.mapdata.utils import assert_multipolygon
|
||||
|
||||
|
||||
def get_nearest_point(polygon, point):
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from matplotlib.path import Path
|
||||
|
||||
from c3nav.routing.utils.base import assert_multipolygon
|
||||
from c3nav.mapdata.utils import assert_multipolygon
|
||||
|
||||
|
||||
def polygon_to_mpl_paths(polygon):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue