Merge two subspace matchings
This commit is contained in:
parent
cbce6ccc44
commit
ee2d7d1b67
|
|
@ -119,19 +119,16 @@ fn draw_ray_2(gc: &mut Vec<Draw>, space: &Space, base: Vec2, dir: Vec2) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let sub = space.which_subspace(ray.pos);
|
let sub = space.which_subspace(ray.pos);
|
||||||
if sub == Boundary {
|
let ret = match sub {
|
||||||
continue;
|
Inner => space.trace_inner(ray),
|
||||||
}
|
Outer => space.trace_outer(ray),
|
||||||
|
Boundary => continue,
|
||||||
|
};
|
||||||
gc.stroke();
|
gc.stroke();
|
||||||
gc.new_dash_pattern();
|
gc.new_dash_pattern();
|
||||||
// gc.dash_length(6.0);
|
// gc.dash_length(6.0);
|
||||||
gc.new_path();
|
gc.new_path();
|
||||||
gc.move_to(ray.pos.x, ray.pos.y);
|
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 {
|
for hit in ret.objects {
|
||||||
let obj = space.objs[hit.id as usize];
|
let obj = space.objs[hit.id as usize];
|
||||||
hits.move_to(obj.loc.pos.x, obj.loc.pos.y);
|
hits.move_to(obj.loc.pos.x, obj.loc.pos.y);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user