Remove unused code

This commit is contained in:
numzero 2024-09-14 17:31:10 +03:00
parent 45e446ae3e
commit 0c0e22423d

View File

@ -226,19 +226,6 @@ fn draw_fan_2(gc: &mut Vec<Draw>, space: &Space, base: Vec2, dir: Vec2, spread:
} }
} }
fn draw_ray(gc: &mut Vec<Draw>, space: &impl Metric, base: Vec2, dir: Vec2) {
let dir = space.globalize(base, dir);
gc.new_path();
gc.move_to(base.x, base.y);
for pt in trace_iter(space, base, dir, DT).take(10000) {
gc.line_to(pt.x, pt.y);
if pt.abs().cmpgt(Vec2::splat(1000.0)).any() {
break;
}
}
gc.stroke();
}
fn draw_track(gc: &mut Vec<Draw>, space: &Space, start: Vec2, dir: Vec2) { fn draw_track(gc: &mut Vec<Draw>, space: &Space, start: Vec2, dir: Vec2) {
const SCALE: f32 = 5.0; const SCALE: f32 = 5.0;
const STEP: f32 = 2.0 * SCALE; const STEP: f32 = 2.0 * SCALE;
@ -275,14 +262,6 @@ fn draw_track(gc: &mut Vec<Draw>, space: &Space, start: Vec2, dir: Vec2) {
} }
} }
fn draw_fan(gc: &mut Vec<Draw>, space: &impl Metric, base: Vec2, dir: Vec2, spread: f32) {
let dir = dir.normalize();
let v = vec2(-dir.y, dir.x);
for y in itertools_num::linspace(-spread, spread, 101) {
draw_ray(gc, space, base, dir + y * v);
}
}
trait Renderable { trait Renderable {
fn render(&self, gc: &mut Vec<Draw>); fn render(&self, gc: &mut Vec<Draw>);
} }