mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-25 11:44:25 +03:00
remove geom debug mode. map_editor has superceded this
This commit is contained in:
parent
32aa38d164
commit
db33e3fa33
@ -45,8 +45,7 @@ impl DebugMode {
|
||||
(hotkey(Key::Num3), "hide lanes"),
|
||||
(hotkey(Key::Num4), "hide areas"),
|
||||
(hotkey(Key::Num5), "hide extra shapes"),
|
||||
(hotkey(Key::Num6), "show geometry debug mode"),
|
||||
(hotkey(Key::Num7), "show labels"),
|
||||
(hotkey(Key::Num6), "show labels"),
|
||||
(hotkey(Key::N), "show neighborhood summaries"),
|
||||
(hotkey(Key::R), "show route for all agents"),
|
||||
(None, "show strongly-connected component roads"),
|
||||
@ -190,7 +189,6 @@ impl State for DebugMode {
|
||||
("lanes", &mut self.layers.show_lanes),
|
||||
("areas", &mut self.layers.show_areas),
|
||||
("extra shapes", &mut self.layers.show_extra_shapes),
|
||||
("geometry debug mode", &mut self.layers.geom_debug_mode),
|
||||
("labels", &mut self.layers.show_labels),
|
||||
] {
|
||||
let show = format!("show {}", label);
|
||||
@ -253,7 +251,6 @@ impl State for DebugMode {
|
||||
let mut opts = self.common.draw_options(ui);
|
||||
opts.label_buildings = self.layers.show_labels;
|
||||
opts.label_roads = self.layers.show_labels;
|
||||
opts.geom_debug_mode = self.layers.geom_debug_mode;
|
||||
for l in &self.connected_roads.lanes {
|
||||
opts.override_colors.insert(
|
||||
ID::Lane(*l),
|
||||
|
@ -2,7 +2,7 @@ use crate::helpers::{ColorScheme, ID};
|
||||
use crate::render::{dashed_lines, DrawCtx, DrawOptions, Renderable, OUTLINE_THICKNESS};
|
||||
use abstutil::Timer;
|
||||
use ezgui::{Color, Drawable, GeomBatch, GfxCtx, Prerender};
|
||||
use geom::{Circle, Distance, Line, PolyLine, Polygon, Pt2D};
|
||||
use geom::{Distance, Line, PolyLine, Polygon, Pt2D};
|
||||
use map_model::{Lane, LaneID, LaneType, Map, Road, TurnType, LANE_THICKNESS, PARKING_SPOT_LENGTH};
|
||||
|
||||
// Split into two phases like this, because AlmostDrawLane can be created in parallel, but GPU
|
||||
@ -114,22 +114,6 @@ impl DrawLane {
|
||||
draw_default: draw,
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_debug(&self, g: &mut GfxCtx, ctx: &DrawCtx) {
|
||||
let circle_color = ctx
|
||||
.cs
|
||||
.get_def("debug line endpoint", Color::rgb_f(0.8, 0.1, 0.1));
|
||||
|
||||
for l in ctx.map.get_l(self.id).lane_center_pts.lines() {
|
||||
g.draw_line(
|
||||
ctx.cs.get_def("debug line", Color::RED),
|
||||
Distance::meters(0.25),
|
||||
&l,
|
||||
);
|
||||
g.draw_circle(circle_color, &Circle::new(l.pt1(), Distance::meters(0.4)));
|
||||
g.draw_circle(circle_color, &Circle::new(l.pt2(), Distance::meters(0.8)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Renderable for DrawLane {
|
||||
@ -137,16 +121,12 @@ impl Renderable for DrawLane {
|
||||
ID::Lane(self.id)
|
||||
}
|
||||
|
||||
fn draw(&self, g: &mut GfxCtx, opts: &DrawOptions, ctx: &DrawCtx) {
|
||||
fn draw(&self, g: &mut GfxCtx, opts: &DrawOptions, _: &DrawCtx) {
|
||||
if let Some(color) = opts.color(self.get_id()) {
|
||||
g.draw_polygon(color, &self.polygon);
|
||||
} else {
|
||||
g.redraw(&self.draw_default);
|
||||
}
|
||||
|
||||
if opts.geom_debug_mode {
|
||||
self.draw_debug(g, ctx);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_outline(&self, map: &Map) -> Polygon {
|
||||
|
@ -110,7 +110,6 @@ pub struct DrawCtx<'a> {
|
||||
pub struct DrawOptions {
|
||||
pub override_colors: HashMap<ID, Color>,
|
||||
pub suppress_traffic_signal_details: Option<IntersectionID>,
|
||||
pub geom_debug_mode: bool,
|
||||
pub label_buildings: bool,
|
||||
pub label_roads: bool,
|
||||
}
|
||||
@ -120,7 +119,6 @@ impl DrawOptions {
|
||||
DrawOptions {
|
||||
override_colors: HashMap::new(),
|
||||
suppress_traffic_signal_details: None,
|
||||
geom_debug_mode: false,
|
||||
label_buildings: false,
|
||||
label_roads: false,
|
||||
}
|
||||
|
@ -398,7 +398,6 @@ pub struct ShowLayers {
|
||||
pub show_lanes: bool,
|
||||
pub show_areas: bool,
|
||||
pub show_extra_shapes: bool,
|
||||
pub geom_debug_mode: bool,
|
||||
pub show_labels: bool,
|
||||
}
|
||||
|
||||
@ -410,7 +409,6 @@ impl ShowLayers {
|
||||
show_lanes: true,
|
||||
show_areas: true,
|
||||
show_extra_shapes: true,
|
||||
geom_debug_mode: false,
|
||||
show_labels: false,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user