Merge two subspace matchings

This commit is contained in:
numzero 2024-09-14 13:10:26 +03:00
parent cbce6ccc44
commit ee2d7d1b67

View File

@ -119,19 +119,16 @@ fn draw_ray_2(gc: &mut Vec<Draw>, space: &Space, base: Vec2, dir: Vec2) {
break;
}
let sub = space.which_subspace(ray.pos);
if sub == Boundary {
continue;
}
let ret = match sub {
Inner => space.trace_inner(ray),
Outer => space.trace_outer(ray),
Boundary => continue,
};
gc.stroke();
gc.new_dash_pattern();
// gc.dash_length(6.0);
gc.new_path();
gc.move_to(ray.pos.x, ray.pos.y);
let ret = match sub {
Inner => space.trace_inner(ray),
Outer => space.trace_outer(ray),
Boundary => panic!(),
};
for hit in ret.objects {
let obj = space.objs[hit.id as usize];
hits.move_to(obj.loc.pos.x, obj.loc.pos.y);