Skip to content
Snippets Groups Projects
Commit 976bfc1f authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Improved activity diagrams.

parent 0e624fe9
No related branches found
No related tags found
No related merge requests found
......@@ -29,21 +29,26 @@
skinparam ActivityFontSize 11
start
if (recursion depth > 30) then (yes)
if (recursion depth > 30?) then (yes)
: search failed;
stop
endif
if (start and end point on same pixel) then (yes)
: return pixel intersection;
if (compare start and end point) then (same pixel)
: intersection ⇦ pixel intersection, with bilinear model;
: return intersection;
note left
this is the nominal return,
at final recursion level
end note
stop
endif
: compute kd-tree deepest level\ncontaining both start and end points;
:compute kd-tree deepest\nlevel sub-tile containing\nboth segment endpoints;
if (compare segment and sub-tile maximum elevation) then (fully above)
: return null;
note right
note left
when the line-of-sight segment is fully above
Digital Elevation Model, we can safely reject
it and proceed to next segment
it and proceed immediately to next segment
end note
stop
endif
......@@ -56,7 +61,7 @@
end note
repeat
:intersection ⇦ recurse(previous, crossing);
if (found intersection?) then (yes)
if (intersection found?) then (yes)
: return intersection;
stop
endif
......
......@@ -34,10 +34,10 @@
: current point ⇦ null;
: hmax ⇦ tile maximum elevation;
while (current point is null)
: entry ⇦ point at altitude hmax;
if (locate entry point) then (in selected tile)
: current ⇦ point at altitude hmax;
if (locate current point) then (in selected tile)
else (outside of selected tile)
: select tile containing entry point;
: select tile containing current point;
: hmax ⇦ max(hmax, tile maximum elevation);
: current point ⇦ null;
endif
......@@ -45,16 +45,16 @@
repeat
: exit ⇦ line-of-sight exit point from tile;
: intersection ⇦ Duvenhage(current, exit);
if (found intersection?) then (yes)
if (intersection found?) then (yes)
: return intersection;
stop
endif
if (tile exited at side?) then (no)
if (tile exit) then (bottom)
: searching ⇦ false;
else (yes)
else (side)
: forward point ⇦ point slightly after exit point;
: select tile containing forward point;
if (DEM traversed between\ncurrent and forward points) then (yes)
if (DEM traversed between\ncurrent and forward points?) then (yes)
: return current point;
note right
extremely rare case!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment