Skip to content

Commit 7641e71

Browse files
committed
add type
1 parent f5012b5 commit 7641e71

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/Distance.jl

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
function distanceToIn(shape, point, dir)
22
if shape isa Trap
3-
distanceToIn_trap(shape, point, dir)
3+
distanceToIn_trap(shape::Trap, point, dir)
44
elseif shape isa Trd
5-
distanceToIn_trd(shape, point, dir)
5+
distanceToIn_trd(shape::Trd, point, dir)
66
elseif shape isa Cone
7-
distanceToIn_cone(shape, point, dir)
7+
distanceToIn_cone(shape::Cone, point, dir)
88
elseif shape isa Box
9-
distanceToIn_box(shape, point, dir)
9+
distanceToIn_box(shape::Box, point, dir)
1010
elseif shape isa Tube
11-
distanceToIn_tube(shape, point, dir)
11+
distanceToIn_tube(shape::Tube, point, dir)
1212
elseif shape isa Aggregate
13-
distanceToIn_volume(shape, point, dir)
13+
distanceToIn_volume(shape::Aggregate, point, dir)
1414
elseif shape isa Polycone
15-
distanceToIn_polycone(shape, point, dir)
15+
distanceToIn_polycone(shape::Polycone, point, dir)
1616
elseif shape isa CutTube
17-
distanceToIn_cuttube(shape, point, dir)
17+
distanceToIn_cuttube(shape::CutTube, point, dir)
1818
elseif shape isa BooleanUnion
19-
distanceToIn_booleanunion(shape, point, dir)
19+
distanceToIn_booleanunion(shape::BooleanUnion, point, dir)
2020
elseif shape isa BooleanSubtraction
21-
distanceToIn_booleansubtraction(shape, point, dir)
21+
distanceToIn_booleansubtraction(shape::BooleanSubtraction, point, dir)
2222
elseif shape isa BooleanIntersection
23-
distanceToIn_booleanintersection(shape, point, dir)
23+
distanceToIn_booleanintersection(shape::BooleanIntersection, point, dir)
2424
end
2525
end
2626
function distanceToOut(shape, point, dir)
2727
if shape isa Trap
28-
distanceToOut_trap(shape, point, dir)
28+
distanceToOut_trap(shape::Trap, point, dir)
2929
elseif shape isa Trd
30-
distanceToOut_trd(shape, point, dir)
30+
distanceToOut_trd(shape::Trd, point, dir)
3131
elseif shape isa Cone
32-
distanceToOut_cone(shape, point, dir)
32+
distanceToOut_cone(shape::Cone, point, dir)
3333
elseif shape isa Box
34-
distanceToOut_box(shape, point, dir)
34+
distanceToOut_box(shape::Box, point, dir)
3535
elseif shape isa Tube
36-
distanceToOut_tube(shape, point, dir)
36+
distanceToOut_tube(shape::Tube, point, dir)
3737
elseif shape isa Aggregate
38-
distanceToOut_volume(shape, point, dir)
38+
distanceToOut_volume(shape::Aggregate, point, dir)
3939
elseif shape isa Polycone
40-
distanceToOut_polycone(shape, point, dir)
40+
distanceToOut_polycone(shape::Polycone, point, dir)
4141
elseif shape isa CutTube
42-
distanceToOut_cuttube(shape, point, dir)
42+
distanceToOut_cuttube(shape::CutTube, point, dir)
4343
elseif shape isa BooleanUnion
44-
distanceToOut_booleanunion(shape, point, dir)
44+
distanceToOut_booleanunion(shape::BooleanUnion, point, dir)
4545
elseif shape isa BooleanSubtraction
46-
distanceToOut_booleansubtraction(shape, point, dir)
46+
distanceToOut_booleansubtraction(shape::BooleanSubtraction, point, dir)
4747
elseif shape isa BooleanIntersection
48-
distanceToOut_booleanintersection(shape, point, dir)
48+
distanceToOut_booleanintersection(shape::BooleanIntersection, point, dir)
4949
end
5050
end

0 commit comments

Comments
 (0)