Make things build with the lyon_geom change

This commit is contained in:
Dustin Carlino 2021-12-23 16:54:15 +00:00
parent 72ae333218
commit c8d88bd689
6 changed files with 530 additions and 544 deletions

57
Cargo.lock generated
View File

@ -144,7 +144,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278"
dependencies = [
"num-traits 0.2.14",
"num-traits",
]
[[package]]
@ -390,7 +390,7 @@ checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
dependencies = [
"libc",
"num-integer",
"num-traits 0.2.14",
"num-traits",
"time",
"winapi 0.3.9",
]
@ -987,7 +987,7 @@ version = "0.22.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da96828553a086d7b18dcebfc579bd9628b016f86590d7453c115e490fa74b80"
dependencies = [
"num-traits 0.2.14",
"num-traits",
]
[[package]]
@ -1077,7 +1077,7 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fc612c5837986b7104a87a0df74a5460931f1c5274be12f8d0f40aa2f30d632"
dependencies = [
"num-traits 0.2.14",
"num-traits",
]
[[package]]
@ -1363,7 +1363,7 @@ dependencies = [
"geo-types",
"geographiclib-rs",
"log",
"num-traits 0.2.14",
"num-traits",
"robust",
"rstar",
]
@ -1375,7 +1375,7 @@ source = "git+https://github.com/21re/rust-geo-booleanop#188f016e44a3ec737ce8e27
dependencies = [
"float_next_after",
"geo-types",
"num-traits 0.2.14",
"num-traits",
"robust",
]
@ -1385,7 +1385,7 @@ version = "0.7.2"
source = "git+https://github.com/georust/geo#2ebbc7f8a8774d9a4a68e9a1b40bcdd22b02fac9"
dependencies = [
"approx",
"num-traits 0.2.14",
"num-traits",
"rstar",
]
@ -1816,7 +1816,7 @@ dependencies = [
"color_quant",
"num-iter",
"num-rational",
"num-traits 0.2.14",
"num-traits",
"png",
]
@ -2132,7 +2132,7 @@ checksum = "6ce4e12203c428a58200b8cf1c0a3aad1cda907008ea11310bb3729593e5f933"
dependencies = [
"arrayvec",
"euclid",
"num-traits 0.2.14",
"num-traits",
]
[[package]]
@ -2213,6 +2213,7 @@ dependencies = [
"js-sys",
"lazy_static",
"log",
"lyon_geom",
"map_model",
"regex",
"rfd",
@ -2241,8 +2242,8 @@ dependencies = [
"geom",
"kml",
"log",
"lyon_geom",
"md5",
"nbez",
"petgraph",
"rand",
"rand_xorshift",
@ -2393,15 +2394,6 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "nbez"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7c6b2f44bbfbabc30a75f197a25b6f4ba6d266f1166106c5661fdae10083aa4"
dependencies = [
"num-traits 0.1.43",
]
[[package]]
name = "ndk"
version = "0.2.1"
@ -2555,7 +2547,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
dependencies = [
"autocfg",
"num-traits 0.2.14",
"num-traits",
]
[[package]]
@ -2566,7 +2558,7 @@ checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59"
dependencies = [
"autocfg",
"num-integer",
"num-traits 0.2.14",
"num-traits",
]
[[package]]
@ -2577,16 +2569,7 @@ checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
dependencies = [
"autocfg",
"num-integer",
"num-traits 0.2.14",
]
[[package]]
name = "num-traits"
version = "0.1.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
dependencies = [
"num-traits 0.2.14",
"num-traits",
]
[[package]]
@ -2698,7 +2681,7 @@ dependencies = [
"ndk 0.3.0",
"ndk-glue 0.3.0",
"num-derive",
"num-traits 0.2.14",
"num-traits",
"oboe-sys",
]
@ -2732,7 +2715,7 @@ version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f100fcfb41e5385e0991f74981732049f9b896821542a219420491046baafdc2"
dependencies = [
"num-traits 0.2.14",
"num-traits",
"serde",
]
@ -2949,7 +2932,7 @@ dependencies = [
"cbindgen",
"geo",
"libc",
"num-traits 0.2.14",
"num-traits",
"thiserror",
]
@ -3106,7 +3089,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "051b398806e42b9cd04ad9ec8f81e355d0a382c543ac6672c62f5a5b452ef142"
dependencies = [
"num-traits 0.2.14",
"num-traits",
"rand",
]
@ -3298,7 +3281,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce61d743ebe516592df4dd542dfe823577b811299f7bee1106feb1bbb993dbac"
dependencies = [
"heapless",
"num-traits 0.2.14",
"num-traits",
"pdqselect",
"smallvec",
]
@ -3510,7 +3493,7 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd5ac56c121948b4879bba9e519852c211bcdd8f014efff766441deff0b91bdb"
dependencies = [
"num-traits 0.2.14",
"num-traits",
]
[[package]]

File diff suppressed because it is too large Load Diff

View File

@ -29,8 +29,8 @@ instant = "0.1.7"
js-sys = { version = "0.3.47", optional = true }
lazy_static = "1.4.0"
log = "0.4.14"
map_model = { path = "../map_model" }
lyon_geom = ">=0.16.2"
map_model = { path = "../map_model" }
regex = "1.5.4"
rfd = "0.4.0"
serde = "1.0.123"

View File

@ -1,7 +1,9 @@
use std::cell::RefCell;
use lyon_geom::math::F64Point;
use lyon_geom::{CubicBezierSegment, QuadraticBezierSegment};
use geom::{Angle, ArrowCap, Circle, Distance, InfiniteLine, Line, PolyLine, Polygon, Pt2D};
use lyon_geom::{CubicBezierSegment, Point, QuadraticBezierSegment};
use map_model::{BufferType, Direction, DrivingSide, Lane, LaneID, LaneType, Map, Road, TurnID};
use widgetry::{Color, Drawable, GeomBatch, GfxCtx, Prerender, RewriteColor};
@ -391,11 +393,11 @@ fn calculate_turn_markings(map: &Map, lane: &Lane) -> Vec<Polygon> {
},
);
fn to_pt(pt: Pt2D) -> Point<f64> {
lyon_geom::point(pt.x(), pt.y())
fn to_pt(pt: Pt2D) -> F64Point {
lyon_geom::math::point(pt.x(), pt.y())
}
fn from_pt(pt: Point<f64>) -> Pt2D {
fn from_pt(pt: F64Point) -> Pt2D {
Pt2D::new(pt.x, pt.y)
}

View File

@ -13,8 +13,8 @@ fast_paths = { git = "https://github.com/easbar/fast_paths", rev = "9a954e02f01e
geom = { path = "../geom" }
kml = { path = "../kml" }
log = "0.4.14"
md5 = "0.7.0"
lyon_geom = ">=0.16.2"
md5 = "0.7.0"
petgraph = { version = "0.6.0", features=["serde-1"] }
rand = "0.8.3"
rand_xorshift = "0.3.0"

View File

@ -1,7 +1,8 @@
use std::collections::{BTreeMap, HashMap, HashSet};
use anyhow::Result;
use lyon_geom::{CubicBezierSegment, Point, QuadraticBezierSegment};
use lyon_geom::math::F64Point;
use lyon_geom::{CubicBezierSegment, QuadraticBezierSegment};
use geom::{Angle, Distance, PolyLine, Pt2D};
@ -224,11 +225,11 @@ fn make_vehicle_turns(i: &Intersection, map: &Map) -> Vec<Turn> {
}
fn curvey_turn(src: &Lane, dst: &Lane, i: &Intersection) -> Result<PolyLine> {
fn to_pt(pt: Pt2D) -> Point<f64> {
lyon_geom::point(pt.x(), pt.y())
fn to_pt(pt: Pt2D) -> F64Point {
lyon_geom::math::point(pt.x(), pt.y())
}
fn from_pt(pt: Point<f64>) -> Pt2D {
fn from_pt(pt: F64Point) -> Pt2D {
Pt2D::new(pt.x, pt.y)
}