function []=drawOccludedAreas(pS,pSCC,forwardBackward,maxXY,precision,fillColor,edgeColor,points)
%function []=drawOccludedAreas(pS,pSCC,forwardBackward,maxXY,precision,fillColor,edgeColor,points)
%
% This function draw the occluded circular trajectory areas given by segments contained in pS and pSCC
%
% Input parameters:
% pS,pSCC-> cell arrays of segments, on both each cell slot is a 2xn matrix containing pairs
% of 2D points (each matrix column vector) defining each segment, both in cartesian and circular
% trajectory coodinates respectively
% maxXY-> maximum x and y dimension for calculating the occluded area
% precision-> indicates the precision at which it is considered that points are equal
% fillColor,edgeColor-> color for drawing the occluded area, both fill and edge color, they are of
% the same type that function plot receives
% points-> number of points of the circular trajectory to be drawn (it is optional)
%
% Output parameters:
% none
%
% Author: Antonio C. DomÃnguez Brito (adominguez@iusiani.ulpgc.es)
% Institution: SIANI-ULPGC (www.iusiani.ulpgc.es)
% Date: March 27th 2009
for segment=[1:size(pS,2)]
if rem(size(pS{segment},2),2)~=0
fprinft('warning: (drawOccludedAreas) segment with an odd number of points (segment=%d)',segment);
end
for innerSegment=[1:2:size(pS{segment},2)]
if nargin>=8
drawOccludedArea( ...
pS{segment}(:,innerSegment),pSCC{segment}(:,innerSegment), ...
pS{segment}(:,innerSegment+1),pSCC{segment}(:,innerSegment+1), ...
forwardBackward, ...
maxXY, ...
precision, ...
fillColor, ...
edgeColor, ...
points ...
);
else
drawOccludedArea( ...
pS{segment}(:,innerSegment),pSCC{segment}(:,innerSegment), ...
pS{segment}(:,innerSegment+1),pSCC{segment}(:,innerSegment+1), ...
forwardBackward, ...
maxXY, ...
precision, ...
fillColor, ...
edgeColor ...
);
end
end
end
return;