28 using namespace GMap3d;
60 marks[0] = AMarkNumberC1;
61 marks[1] = AMarkNumberC2;
62 marks[2] = AMarkNumberC3;
63 marks[3] = AMarkNumberS0;
64 marks[4] = AMarkNumberS1;
65 marks[5] = AMarkNumberS2;
68 for(
int i=0 ; i<=5; i++)
79 for ( ; cov.
cont(); ++cov )
81 for(
int i=0; i<=2; i++)
85 if ( isMarked(*cov, marks[i]) )
96 for(
int i=3; i<=5; i++)
100 if ( isMarked(*cov, marks[i]) )
123 for(
int i=0; i<=5; i++)
126 if ( isMarked(*cov, marks[i]) )
130 if ( firstMark==-1 ) firstMark = i;
142 cell = (firstMark+1)%4;
148 CDart* current = NULL;
153 for(
int i=0; i<=1; i++)
158 if ( !(isMarked( *cov, marks[i]) ||
159 isMarked( *cov, marks[i+4]) ) &&
160 (isMarked( alpha(*cov, cell), marks[i]) ||
161 isMarked( alpha(*cov, cell), marks[i+4])) )
164 t2 = alpha(current, cell);
166 while (isMarked(t2, marks[i]) || isMarked(t2, marks[i+4]) )
168 if (isMarked(t2, marks[i]))
169 t2 = alpha(alpha(t2, cell-1), cell);
171 t2 = alpha(alpha(t2, cell+1), cell);
174 if ( t2 != alpha(current, cell) )
176 unsew(current, cell);
177 if ( !isFree(t2, cell) ) unsew(t2, cell);
178 if ( t2!=current ) sew(current, t2, cell);
183 if (AMarkNumberC3 != -1)
185 if ( !isMarked( *cov, AMarkNumberC3) &&
186 isMarked( alpha(*cov, 3), AMarkNumberC3) )
189 t2 = alpha(current, 3);
191 while (isMarked(t2, AMarkNumberC3))
193 t2 = alpha(alpha(t2, 2), 3);
196 if ( t2 != alpha(current, 3) )
199 if ( !isFree(t2, 3) ) unsew(t2, 3);
200 if ( t2!=current ) sew(current, t2, 3);
204 if (AMarkNumberS0 != -1)
206 if ( !isMarked( *cov, AMarkNumberS0) &&
207 isMarked( alpha(*cov, 0), AMarkNumberS0) )
210 t2 = alpha(current, 0);
212 while (isMarked(t2, AMarkNumberS0))
214 t2 = alpha(alpha(t2, 1), 0);
217 if ( t2 != alpha(current, 0) )
220 if ( !isFree(t2, 0) ) unsew(t2, 0);
221 if ( t2!=current ) sew(current, t2, 0);
232 for (
int i=0; i<=5; i++)
236 if ( isMarked(*cov, marks[i]) )