Research Article

Visibility Detection of 3D Objects and Visual K-Nearest Neighbor Query Based on Convex Hull Model

Algorithm 2

MulObs algorithm.
Input: query point q, obstacle point set List<Obs> O
Output: “Combined Obstacle” Set List<Obs>
(1) BEGIN
(2) ListObs←Construct(q, O);
(3) ListExitIndex = null;
(4)  for(k = 0; k < ListObs.size(); k++) do
(5)   if(!ListExitIndex.Contains(k)) then
(6)    ListExitIndex.Add(k);
(7)    obs = ListObs[k];
(8)   end if
(9)   for(i = 0; i < ListObs.size(); i++) do
(10)    lines = getLines(obs);
(11)    face = getFace(ListObs[i]);
(12)    if(isThrough(lines, face)) then
(13)     obs = ComObs (obs, listObs[i]);
(14)     ListExitIndex.Add(i);
(15)    end if
(16)    .Add(obs);
(17)   end for
(18) end for
(19) Return ;
(20) END