Newer
Older
' Licensed to CS GROUP (CS) under one or more
' contributor license agreements. See the NOTICE file distributed with
' this work for additional information regarding copyright ownership.
' CS licenses this file to You under the Apache License, Version 2.0
' (the "License"); you may not use this file except in compliance with
' the License. You may obtain a copy of the License at
'
' http://www.apache.org/licenses/LICENSE-2.0
'
' Unless required by applicable law or agreed to in writing, software
' distributed under the License is distributed on an "AS IS" BASIS,
' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
' See the License for the specific language governing permissions and
' limitations under the License.
@startuml
skinparam svek true
skinparam NoteBackgroundColor #F3EFEB
skinparam NoteBorderColor #691616
skinparam NoteFontColor #691616
skinparam ActivityStartColor #6A584B
skinparam ActivityEndColor #6A584B
skinparam ActivityBarColor #6A584B
skinparam ActivityBorderColor #691616
skinparam ActivityBackgroundColor #F3EFEB/CCC9C5
skinparam ActivityArrowColor #691616
skinparam ActivityFontSize 11
start
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
:compute kd-tree deepest\nlevel sub-tile containing\nboth segment endpoints;
if (compare segment and sub-tile maximum elevation) then (fully above)
: return null;
when the line-of-sight segment is fully above
Digital Elevation Model, we can safely reject
:previous ⇦ start;
: crossings ⇦ line-of-sight segment crossings of next level sub-tiles;
note right
crossings can be computed either
using flat body hypothesis
or taking curvature into account
end note
repeat
:intersection ⇦ recurse(previous, crossing);
:intersection ⇦ recurse(previous, end);