Dustin Carlino
60d4e0af33
list existing polygons with menu
2018-09-19 12:28:29 -07:00
Dustin Carlino
bcc65941f3
saving polygon areas
2018-09-19 09:30:01 -07:00
Dustin Carlino
ce91b77ad6
highlighting the cursor in text boxes
2018-09-18 18:52:25 -07:00
Dustin Carlino
0cd27d7f50
move existing points in a drawn polygon
2018-09-18 17:58:14 -07:00
Dustin Carlino
8b0fb9248c
using Pt2D in ezgui's API when appropriate
2018-09-18 15:09:17 -07:00
Dustin Carlino
20a1bb7923
dispersing the remainders of map_model::geometry
2018-09-18 14:35:10 -07:00
Dustin Carlino
2c7e281a8e
make renderables return Bounds, not the aabb type
2018-09-18 14:17:26 -07:00
Dustin Carlino
1050d86e67
making a proper Circle type in geom
2018-09-18 14:00:55 -07:00
Dustin Carlino
49ebe97c21
small refactor in ezgui and polyline
2018-09-18 13:39:55 -07:00
Dustin Carlino
7dc192b0c9
refactoring helpers to draw lines
2018-09-18 13:29:30 -07:00
Dustin Carlino
aaa681a527
starting a plugin to draw arbitrary polygons over the map
2018-09-18 08:24:09 -07:00
Dustin Carlino
67ef04b3c2
unifying tooltip handling a bit
2018-09-16 15:57:23 -07:00
Dustin Carlino
dba3893ee5
handle linear waterway areas
2018-09-16 15:38:33 -07:00
Dustin Carlino
304b4e929e
detecting parks, swamps, waterways from OSM
2018-09-16 14:02:42 -07:00
Dustin Carlino
361755400d
rendering for areas
2018-09-16 13:37:11 -07:00
Dustin Carlino
99f73b7e3d
move some ID methods to the right place
2018-09-15 20:03:07 -07:00
Dustin Carlino
e4339436fc
make bus stops a separate layer to render. easy!
2018-09-15 19:58:25 -07:00
Dustin Carlino
74ad9d0819
split bus stops into their own first-class object in the map model layer
2018-09-15 19:02:10 -07:00
Dustin Carlino
5a97a072c0
disable building boundary rendering; looks pretty cool without it
2018-09-15 17:06:23 -07:00
Dustin Carlino
e65f3aecc7
update to rust 1.29, re-run format
2018-09-15 16:54:00 -07:00
Dustin Carlino
35141dee40
at last, the satisfying collapsing of all the boilerplate color functions
2018-09-15 16:52:37 -07:00
Dustin Carlino
d7cebbe860
move default colors to each renderable, and remove turn colors
...
"plugin"
2018-09-15 16:43:12 -07:00
Dustin Carlino
008c63cd1a
passing ctx to both plugins and renderers, so we can debug lanes
2018-09-15 14:56:21 -07:00
Dustin Carlino
269642a984
give plugins a better way to express color
2018-09-14 22:18:49 -07:00
Dustin Carlino
35c8447f84
tune MIN_ZOOM_FOR_MOUSEOVER
2018-09-14 13:23:39 -07:00
Dustin Carlino
c08477a9e9
draw lane details with generic quadtree, based on render options
2018-09-14 13:18:02 -07:00
Dustin Carlino
1c5386c011
draw building front paths again with generic quadtree
2018-09-14 13:04:10 -07:00
Dustin Carlino
772ab784a7
generic quadtree support for show_turn_icons
2018-09-14 13:01:28 -07:00
Dustin Carlino
423044a69d
generic quadtree support for ToggleableLayers
2018-09-14 12:55:30 -07:00
Dustin Carlino
4a46990457
generic quadtree - initial round. broke some features, will add them
...
back in next.
2018-09-14 12:44:10 -07:00
Dustin Carlino
46c1fb705e
the more useful get_id for renderables
2018-09-13 22:40:07 -07:00
Dustin Carlino
5303087fa2
making DrawCar implement renderable
2018-09-13 22:33:58 -07:00
Dustin Carlino
b3d2a5c5be
WIP making DrawPed implement Renderable
2018-09-13 22:15:03 -07:00
Dustin Carlino
48a47ff013
make parcels selectable too
2018-09-13 14:14:10 -07:00
Dustin Carlino
78d09fdb6d
make toggleable layer stuff just another plugin
2018-09-13 12:01:53 -07:00
Dustin Carlino
a059bccfd5
making more plugins initiate themselves, instead of UI doing it
2018-09-13 11:57:18 -07:00
Dustin Carlino
853665406b
killing the selection plugin
2018-09-13 11:28:33 -07:00
Dustin Carlino
8db279ff7c
refactoring toggleable layers
2018-09-13 10:49:56 -07:00
Dustin Carlino
799eeec73d
moving all logic out of selection plugin
2018-09-13 10:32:01 -07:00
Dustin Carlino
839ded2eed
moving hider into its own module
2018-09-13 09:51:44 -07:00
Dustin Carlino
1f8a73fb6e
going through and checking definitions of active plugins
2018-09-13 09:41:51 -07:00
Dustin Carlino
05219623bd
one active plugin at a time. easy.
2018-09-13 09:21:47 -07:00
Dustin Carlino
5fb8408a4e
just move plugin event handlers to a list of closures
2018-09-12 23:10:27 -07:00
Dustin Carlino
147901790c
first lift sim out of sim ctrl
2018-09-12 17:43:58 -07:00
Dustin Carlino
04a25bd489
refactor selection plugin at last
2018-09-12 16:58:21 -07:00
Dustin Carlino
f98f8953c1
move more drawing logic out of selection state
2018-09-12 16:26:24 -07:00
Dustin Carlino
855258ac97
moving turn cycling logic out of SelectionState
2018-09-12 16:20:13 -07:00
Dustin Carlino
db098eda69
just refactor selection plugin's color_for
2018-09-12 14:19:13 -07:00
Dustin Carlino
9d96eb1741
making a renderable trait, making everything implement it. killed a few
...
colors.
2018-09-11 13:42:53 -07:00
Dustin Carlino
986717dc76
dont expose ezgui's modules
2018-09-10 17:32:33 -07:00
Dustin Carlino
571aa2f786
split out experimental playground GUI stuff into its own crate
2018-09-09 19:16:41 -07:00
Dustin Carlino
64d4117c0c
moving GUI runner to ezgui
2018-09-09 18:50:36 -07:00
Dustin Carlino
ad55fd2924
detect when editor_state is for another map and ignore intersection changes
2018-09-09 13:21:53 -07:00
Dustin Carlino
f3982282de
speed up building creation by doing sidewalk finding in bulk
2018-09-08 13:28:09 -07:00
Dustin Carlino
630f6504f4
stick in some flamegraph timings to part of map loading
2018-09-08 13:01:39 -07:00
Dustin Carlino
ba9fe54c2a
trying to make medium map load!
...
- new polyline shifting that keeps a constant width, even at sharp
corners. it breaks and is slow when shifting just to make thick
polygons, so keep the old version around for that. actually, disable
it always. :(
- deal with bus stops on sidewalks with no associated driving lane
- more hacks to make dist_along_of_pt work for horiz/vertical lines
- handling bus stops close to the end of a sidewalk
2018-09-08 12:48:25 -07:00
Dustin Carlino
6bff2113be
more OSM types so medium map doesn't immediately crash. trying to fix
...
bad polyline projection in another branch, but don't have it working yet
2018-09-08 10:15:38 -07:00
Dustin Carlino
3cff2cecd7
stop drawing text labels on lanes
2018-09-07 15:15:16 -07:00
Dustin Carlino
87a33a6c78
replaced parts of the polygon ear clipping and seemingly fixed all the
...
problems!
2018-09-07 15:03:28 -07:00
Dustin Carlino
1b30dafb03
now construct bus stops in the map model layer... working, seemingly
2018-09-06 19:14:29 -07:00
Dustin Carlino
a5bc4d6b83
draw front paths below buildings to avoid overlap
2018-09-05 11:26:44 -07:00
Dustin Carlino
93e4e4217e
moving some init helpers to be methods of sim
2018-08-31 15:11:18 -07:00
Dustin Carlino
c38c9d43ac
visualize an agent's path
2018-08-30 15:30:53 -07:00
Dustin Carlino
b7379fcdf8
woops, bus length was wrong
2018-08-29 13:40:07 -07:00
Dustin Carlino
bb619a9ddd
oops, using the wrong router in lookahead, fixed a bug
2018-08-29 13:26:00 -07:00
Dustin Carlino
94b80ccf34
a UI plugin to follow a car or ped
2018-08-29 11:26:52 -07:00
Dustin Carlino
a9bb71c59f
modeling and rendering bus stops
2018-08-27 15:06:13 -07:00
Dustin Carlino
3333aa69a8
refactoring helpers for tests and headless
2018-08-27 13:52:34 -07:00
Dustin Carlino
891b07bec4
load from map or savestate
2018-08-27 13:14:03 -07:00
Dustin Carlino
f0a60e434d
load most recent sim savestate
2018-08-27 11:42:55 -07:00
Dustin Carlino
269235d1e1
writing savestates in a consistent place
2018-08-27 11:10:02 -07:00
Dustin Carlino
c3d7595fc3
(slightly) smarter stop sign assignment
2018-08-24 12:46:09 -07:00
Dustin Carlino
f36c94c730
render individual points from extra KML, and refactor some circle helpers
2018-08-23 15:17:37 -07:00
Dustin Carlino
7745678794
make the spawner deal with trips and transitions... big revamp for it
2018-08-23 10:11:56 -07:00
Dustin Carlino
82952ef198
remembering where the front path hits the sidewalk
2018-08-22 12:21:58 -07:00
Dustin Carlino
a2399f6613
trimming front paths to building edges
2018-08-22 11:54:18 -07:00
Dustin Carlino
00056e6e81
require a front path for buildings, by ignoring street names
2018-08-22 11:33:29 -07:00
Dustin Carlino
0e2ae49596
debug a car in a different color
2018-08-22 10:13:32 -07:00
Dustin Carlino
ef307e817f
debugging for an intersection policy problem. traffic signal allows
...
overrun!
2018-08-21 19:02:24 -07:00
Dustin Carlino
1eecc48dbe
removing parametric driving model for now. too much work to keep it updated as aorta driving model improves, and no benefit anticipated.
2018-08-20 12:39:03 -07:00
Dustin Carlino
e2ee2ecc84
drawing cars a bit more nicely
2018-08-19 19:01:31 -07:00
Dustin Carlino
cef21f2545
dont start a parked car if it'll cause a crash. keep trying till it
...
works.
2018-08-17 14:26:42 -07:00
Dustin Carlino
8bf2b67e10
fixing a few bugs causing bigger maps to not load at all
2018-08-17 10:54:44 -07:00
Dustin Carlino
d3611c6084
easier queries for lane type
2018-08-14 21:25:19 -07:00
Dustin Carlino
1720e51828
WIP start a specific parked car, not the last one in the lane. broken,
...
because multiple cars jump to the beginning of the driving lane. need to
make them start in the right position (and then go there slowly)
2018-08-14 21:13:05 -07:00
Dustin Carlino
7eb279a978
simplify toggleable layer; dont need to repeat key names
2018-08-14 14:06:32 -07:00
Dustin Carlino
b55e0ae263
displaying extra arbitraryish kml for debugging
2018-08-14 14:01:41 -07:00
Dustin Carlino
40cb2bf6f4
making draw_polygon only accept a geom Polygon. guess ezgui depending on geom is fine.
2018-08-09 10:57:19 -07:00
Dustin Carlino
0caa8969dd
fix contains_pt signature
2018-08-09 10:49:26 -07:00
Dustin Carlino
bf2bd09a54
WIP converting lanes and draw car to new polygon
2018-08-09 10:36:29 -07:00
Dustin Carlino
1b610aa708
making a proper polygon type, finally. using it in a few places, not all
...
yet
2018-08-08 18:00:10 -07:00
Dustin Carlino
5d2a4f3ac4
trying an ear clipping algorithm for buildings and parcels. works great,
...
lots of cleanup needed now!
2018-08-08 14:39:08 -07:00
Dustin Carlino
7b53264bb8
WIP debugging bad building polygon drawing
2018-08-08 13:21:45 -07:00
Dustin Carlino
449085f02f
stop sign should only admit leader vehicles
2018-08-08 11:50:05 -07:00
Dustin Carlino
4c0a8f588a
still debugging various breakages. drawing lane IDs
2018-08-07 12:23:00 -07:00
Dustin Carlino
e31061860b
drawing groups of parcels with different colors. very slow, since it's
...
done without a quadtree and every load
2018-08-06 12:54:56 -07:00
Dustin Carlino
be4ffc8d31
only draw turn icons in editor mode
2018-08-05 14:24:38 -07:00
Dustin Carlino
7611be90ab
trying enums with delegation...
2018-08-04 12:26:58 -07:00
Dustin Carlino
c2306ef47a
forking aorta driving model from parametric one...
2018-08-04 08:03:55 -07:00
Dustin Carlino
7f6bc5aac4
refactoring selection plugin, dont popup tooltips without Ctrl
2018-08-03 14:11:15 -07:00
Dustin Carlino
73eaf4818f
draw thick border around buildings
2018-08-02 12:42:43 -07:00
Dustin Carlino
d47912e13c
hide turn icons when lane is hidden
2018-08-02 12:24:19 -07:00
Dustin Carlino
67c81df83f
draw stopping buffer for cars
2018-08-02 11:15:47 -07:00
Dustin Carlino
1348db1288
different colors for cars and peds
2018-08-01 15:06:23 -07:00
Dustin Carlino
a4b8c2247f
debugging for intersections
2018-08-01 14:39:38 -07:00
Dustin Carlino
5ad6f53607
use new dimensioned version, letting us serialize maps and clean up
...
hacks elsewhere
2018-08-01 14:05:38 -07:00
Dustin Carlino
aaf2933768
debug cars and peds
2018-08-01 09:35:02 -07:00
Dustin Carlino
c7aced1112
coloring pedestrians differently when selected
2018-07-31 13:56:14 -07:00
Dustin Carlino
473b5bf22e
handle missing objects in warp plugin
2018-07-31 13:49:04 -07:00
Dustin Carlino
296e16aea9
warp to agents
2018-07-31 13:25:03 -07:00
Dustin Carlino
a91359a66f
render buildings earlier so paths dont overlap sidewalks
2018-07-30 20:51:53 -07:00
Dustin Carlino
1cf2ca435e
display cars/peds at low zoom levels in intersections
2018-07-28 11:21:46 -07:00
Dustin Carlino
ac0f580ef1
adjust when color picker runs, to avoid a key conflict
2018-07-28 11:12:28 -07:00
Dustin Carlino
298babc85d
parallelizing parked->driving car pathfinding too
2018-07-28 11:02:28 -07:00
Dustin Carlino
3fa06fd032
dont repeat keypress manually in OSD message
2018-07-26 14:28:01 -07:00
Dustin Carlino
ab986a3a8a
debugging turn-making funkiness
2018-07-26 13:18:37 -07:00
Dustin Carlino
d22d955dbb
deleting and adding turns when edited
2018-07-26 13:06:37 -07:00
Dustin Carlino
7b4df16c8e
printing reasons why edits are invalid
2018-07-26 12:14:37 -07:00
Dustin Carlino
904aa4449e
editing lane types, vastly simplified, no turns yet
2018-07-26 12:04:02 -07:00
Dustin Carlino
de54b917bc
changing turns to have IDs thatll be stable across edits
2018-07-25 19:01:47 -07:00
Dustin Carlino
3e72f39121
planning how to do live road edits
2018-07-25 18:19:39 -07:00
Dustin Carlino
9200a5ef3d
use pretty assertions
2018-07-24 16:23:25 -07:00
Dustin Carlino
c321c07bd7
make map use road edits when loading from scratch
2018-07-24 16:06:25 -07:00
Dustin Carlino
120e7c5db1
plumb through UI controls for road edits
2018-07-24 15:43:01 -07:00
Dustin Carlino
2ba0647b7c
saving and loading road edits in the UI
2018-07-24 15:30:40 -07:00
Dustin Carlino
9fbf48c495
defining the basic data model for some road edits
2018-07-24 12:30:56 -07:00
Dustin Carlino
30b992e7f0
wait, make road remember lane types too
2018-07-24 11:40:58 -07:00
Dustin Carlino
7d187bcceb
ripping out other_side too
2018-07-24 10:56:23 -07:00
Dustin Carlino
83d5e75e43
store children in road, and stop storing some state in lane and query it instead
2018-07-24 09:23:23 -07:00
Dustin Carlino
549aa75d9c
lifted unshifted pts to road
2018-07-24 08:59:01 -07:00
Dustin Carlino
4bf72b36c8
removing osm metadata from lanes now
2018-07-24 08:18:47 -07:00
Dustin Carlino
cb26955f8e
introduce RoadID
2018-07-24 07:28:11 -07:00
Dustin Carlino
4207b2cacf
rename existing roads to lanes
2018-07-23 20:24:53 -07:00
Dustin Carlino
3017728515
introducing bike lanes! no turns yet
2018-07-23 10:56:45 -07:00
Dustin Carlino
7ee8ef0d8d
cleaning up after polyline trimming
2018-07-23 10:05:20 -07:00
Dustin Carlino
272620119f
WIP working on polyline trimming, but nice and slowly this time
2018-07-23 09:41:51 -07:00
Dustin Carlino
36bfa9cfdf
be able to relate lanes to orig road idx, for debugging
2018-07-22 17:18:13 -07:00
Dustin Carlino
1c85188a64
WIP removing disconnected chunks of map. leaves orphaned intersections
...
still, so disabled.
2018-07-22 16:31:31 -07:00
Dustin Carlino
51fa14d934
parsing shapefiles again for traffic signals
2018-07-20 11:27:57 -07:00
Dustin Carlino
f54d581016
fixing pedestrian mouseover
2018-07-14 13:38:15 -05:00
Dustin Carlino
e5de791fa7
starting to model pedestrians. spawn and draw them.
2018-07-11 15:06:31 -07:00
Dustin Carlino
9c21dae3d9
making turns for crosswalks. had to rethink how turns work slightly.
2018-07-11 12:10:56 -07:00
Dustin Carlino
9ca0682108
handle lanes with no turns
2018-07-10 12:10:12 -07:00
Dustin Carlino
5ffa4ba7c7
centering parked cars in their spots
2018-07-09 16:08:23 -07:00
Dustin Carlino
282f20e438
drawing parked cars
2018-07-09 14:17:33 -07:00
Dustin Carlino
8b58665dbd
handling new build errors after 1.27...
2018-07-09 13:44:52 -07:00
Dustin Carlino
2ebc13140b
round of rustfmt after 1.27 upgrade
2018-07-09 12:30:59 -07:00
Dustin Carlino
d3bcbe1da2
lots of the logic to start a parked car
2018-07-09 11:59:40 -07:00
Dustin Carlino
bf68be8870
moving the sim state that's driving-specific
2018-07-09 11:07:54 -07:00
Dustin Carlino
8b908d2744
calculating the number of parking spots
2018-07-09 09:16:12 -07:00
Dustin Carlino
c033f51da2
make cars pathfind to their destination
2018-07-08 15:40:39 -07:00
Dustin Carlino
c6ebab1e9c
move some sim code
2018-07-08 14:00:03 -07:00
Dustin Carlino
0e4ff75286
setting up an intersection test in experimental
2018-07-07 10:48:46 -07:00
Dustin Carlino
d5de9cb8eb
use macros, instead -- more readable
2018-07-06 14:51:14 -07:00
Dustin Carlino
6ea73a26e4
WIP experimenting with list of closures
2018-07-06 14:41:58 -07:00
Dustin Carlino
28ea70adea
and gui itself
2018-07-06 14:15:19 -07:00
Dustin Carlino
9df7da33b1
and selection
2018-07-06 14:11:33 -07:00
Dustin Carlino
44fc98cb51
and warp
2018-07-06 14:07:22 -07:00
Dustin Carlino
db99e3c9f7
same for search
2018-07-06 14:05:14 -07:00
Dustin Carlino
7bbaa84996
make color picker mutate itself
2018-07-06 14:01:01 -07:00
Dustin Carlino
09e0c43fd5
and geom validator
2018-07-06 13:56:14 -07:00
Dustin Carlino
24ed8d17f8
and stop sign editor
2018-07-06 13:49:08 -07:00
Dustin Carlino
71d466733b
same for signal editor
2018-07-06 13:45:11 -07:00
Dustin Carlino
79f58155d9
make floodfiller own its state completely
2018-07-06 13:38:15 -07:00
Dustin Carlino
18132e3c8b
consistently having one(ish) plugin do stuff at a time
2018-07-06 12:25:43 -07:00
Dustin Carlino
e2aabeb0e9
refactoring drawing primitives into GfxCtx
2018-07-06 11:04:18 -07:00
Dustin Carlino
8f244438c1
plumbing window_size with canvas
2018-07-06 10:26:35 -07:00
Dustin Carlino
10dfceb4ec
make geom validator warp
2018-07-06 09:16:14 -07:00
Dustin Carlino
15786cddf5
warping to anything
2018-07-06 09:05:39 -07:00
Dustin Carlino
445a1925eb
making geom validation interactive
2018-07-06 08:47:56 -07:00
Dustin Carlino
dee6c97f4c
draw stop sign in intersections too
2018-07-04 14:05:21 -07:00
Dustin Carlino
c58b91ee4d
cleaning up intersection colors
2018-07-04 13:29:46 -07:00
Dustin Carlino
92f8aeff1e
drawing a traffic signal, no good colors yet
2018-07-04 13:22:15 -07:00
Dustin Carlino
fb24efe1f1
fix bbox for bldgs to include path
2018-07-03 17:57:19 -07:00
Dustin Carlino
73455017c2
depicting stop signs very primitively
2018-07-03 17:15:03 -07:00
Dustin Carlino
2f9ff9d069
refactoring road markings
2018-07-03 17:02:20 -07:00
Dustin Carlino
2f8d1e8150
highlight the road after warping to it
2018-07-03 14:47:42 -07:00
Dustin Carlino
f1024792e4
validate geometry doesn't overlap for a rendered map
2018-07-03 14:43:53 -07:00
Dustin Carlino
d66d070dd6
reset selection state after hiding something
2018-07-03 09:44:39 -07:00
Dustin Carlino
46b159ae8f
be able to hide stuff temporarily
2018-06-29 12:23:24 -07:00
Dustin Carlino
f9c1b3b526
WIP representing polyline shifting failure
2018-06-29 11:17:39 -07:00
Dustin Carlino
fe53536024
prototyping crosswalks
2018-06-29 10:30:36 -07:00
Dustin Carlino
a082fbb511
moving stuff to geom crate
2018-06-28 20:35:00 -07:00
Dustin Carlino
34e7f11cda
get rid of vecmath
2018-06-28 19:46:21 -07:00
Dustin Carlino
8e1f9b79f0
PolyLine struct
2018-06-28 18:02:14 -07:00
Dustin Carlino
7f09f22bcf
making a line struct
2018-06-28 17:14:27 -07:00
Dustin Carlino
4bdf70365e
making my own angle class
2018-06-28 15:07:48 -07:00
Dustin Carlino
987f039404
LonLat to Pt2D more explicit
2018-06-28 14:19:59 -07:00
Dustin Carlino
ff526a6854
split out HashablePt2D
2018-06-28 13:55:43 -07:00
Dustin Carlino
849a132a6a
dashed white lines on big roads
2018-06-27 12:48:11 -07:00
Dustin Carlino
02d7053239
trying to fix the general case... maybe detecting the problem. giving up
...
for now.
2018-06-26 14:09:53 -07:00
Dustin Carlino
f5fc04a14e
WIP debugging bad polygons. seemingly fixed one pt inversion case that
...
happens only on the first pt.
2018-06-26 13:23:56 -07:00
Dustin Carlino
ed799097dc
render parcel interior with nice colors, but draw it lowest
2018-06-26 11:22:18 -07:00
Dustin Carlino
50aa53e9a9
drawing parking markings too
2018-06-26 11:11:34 -07:00
Dustin Carlino
736d143b30
draw sidewalk marks
2018-06-26 10:36:24 -07:00
Dustin Carlino
43536743a8
warp plugin, and making text entry handle numbers
2018-06-26 09:05:14 -07:00
Dustin Carlino
8de92c095a
OSM tags as a hash, now that serialization is easy
2018-06-26 07:35:34 -07:00
Dustin Carlino
bc92c3ca8d
replacing the pb with serde stuff
2018-06-25 18:56:57 -07:00
Dustin Carlino
fcec05cdfa
rm old thick line stuff at last
2018-06-25 16:16:40 -07:00
Dustin Carlino
e1e3abbb28
fixed turns that vanished
2018-06-25 15:42:04 -07:00