|
1 | 1 | function distanceToIn(shape, point, dir) |
2 | 2 | if shape isa Trap |
3 | | - distanceToIn_trap(shape, point, dir) |
| 3 | + distanceToIn_trap(shape::Trap, point, dir) |
4 | 4 | elseif shape isa Trd |
5 | | - distanceToIn_trd(shape, point, dir) |
| 5 | + distanceToIn_trd(shape::Trd, point, dir) |
6 | 6 | elseif shape isa Cone |
7 | | - distanceToIn_cone(shape, point, dir) |
| 7 | + distanceToIn_cone(shape::Cone, point, dir) |
8 | 8 | elseif shape isa Box |
9 | | - distanceToIn_box(shape, point, dir) |
| 9 | + distanceToIn_box(shape::Box, point, dir) |
10 | 10 | elseif shape isa Tube |
11 | | - distanceToIn_tube(shape, point, dir) |
| 11 | + distanceToIn_tube(shape::Tube, point, dir) |
12 | 12 | elseif shape isa Aggregate |
13 | | - distanceToIn_volume(shape, point, dir) |
| 13 | + distanceToIn_volume(shape::Aggregate, point, dir) |
14 | 14 | elseif shape isa Polycone |
15 | | - distanceToIn_polycone(shape, point, dir) |
| 15 | + distanceToIn_polycone(shape::Polycone, point, dir) |
16 | 16 | elseif shape isa CutTube |
17 | | - distanceToIn_cuttube(shape, point, dir) |
| 17 | + distanceToIn_cuttube(shape::CutTube, point, dir) |
18 | 18 | elseif shape isa BooleanUnion |
19 | | - distanceToIn_booleanunion(shape, point, dir) |
| 19 | + distanceToIn_booleanunion(shape::BooleanUnion, point, dir) |
20 | 20 | elseif shape isa BooleanSubtraction |
21 | | - distanceToIn_booleansubtraction(shape, point, dir) |
| 21 | + distanceToIn_booleansubtraction(shape::BooleanSubtraction, point, dir) |
22 | 22 | elseif shape isa BooleanIntersection |
23 | | - distanceToIn_booleanintersection(shape, point, dir) |
| 23 | + distanceToIn_booleanintersection(shape::BooleanIntersection, point, dir) |
24 | 24 | end |
25 | 25 | end |
26 | 26 | function distanceToOut(shape, point, dir) |
27 | 27 | if shape isa Trap |
28 | | - distanceToOut_trap(shape, point, dir) |
| 28 | + distanceToOut_trap(shape::Trap, point, dir) |
29 | 29 | elseif shape isa Trd |
30 | | - distanceToOut_trd(shape, point, dir) |
| 30 | + distanceToOut_trd(shape::Trd, point, dir) |
31 | 31 | elseif shape isa Cone |
32 | | - distanceToOut_cone(shape, point, dir) |
| 32 | + distanceToOut_cone(shape::Cone, point, dir) |
33 | 33 | elseif shape isa Box |
34 | | - distanceToOut_box(shape, point, dir) |
| 34 | + distanceToOut_box(shape::Box, point, dir) |
35 | 35 | elseif shape isa Tube |
36 | | - distanceToOut_tube(shape, point, dir) |
| 36 | + distanceToOut_tube(shape::Tube, point, dir) |
37 | 37 | elseif shape isa Aggregate |
38 | | - distanceToOut_volume(shape, point, dir) |
| 38 | + distanceToOut_volume(shape::Aggregate, point, dir) |
39 | 39 | elseif shape isa Polycone |
40 | | - distanceToOut_polycone(shape, point, dir) |
| 40 | + distanceToOut_polycone(shape::Polycone, point, dir) |
41 | 41 | elseif shape isa CutTube |
42 | | - distanceToOut_cuttube(shape, point, dir) |
| 42 | + distanceToOut_cuttube(shape::CutTube, point, dir) |
43 | 43 | elseif shape isa BooleanUnion |
44 | | - distanceToOut_booleanunion(shape, point, dir) |
| 44 | + distanceToOut_booleanunion(shape::BooleanUnion, point, dir) |
45 | 45 | elseif shape isa BooleanSubtraction |
46 | | - distanceToOut_booleansubtraction(shape, point, dir) |
| 46 | + distanceToOut_booleansubtraction(shape::BooleanSubtraction, point, dir) |
47 | 47 | elseif shape isa BooleanIntersection |
48 | | - distanceToOut_booleanintersection(shape, point, dir) |
| 48 | + distanceToOut_booleanintersection(shape::BooleanIntersection, point, dir) |
49 | 49 | end |
50 | 50 | end |
0 commit comments