26 using namespace GMap3d;
29 CDart * AMesh1Corners[2],
64 assert(AMesh1Corners!=NULL);
82 switch (cov.prevOperationType())
86 if (jumped) ++n;
else ++m;
104 int perimeter = m + n + 1;
105 int length = ASx==0 ? 1 : 2*ASx;
109 for (j=0; j<length; ++j)
111 beam[j] =
new CDart * [perimeter];
113 for (i=0; i<perimeter; ++i)
118 for (i=0; i<perimeter; ++i)
119 for (j=1; j<length; j+=2)
131 for (i=m, alpha2=
true; i>0; --i, alpha2=!
alpha2)
133 for (j=0; j<length; ++j)
136 for (j=0; j<length; ++j)
140 for (i=m, alpha2=
false; i<perimeter-1; ++i, alpha2=!
alpha2)
142 for (j=0; j<length; ++j)
145 for (j=0; j<length; ++j)
150 for (j=0; j<length; ++j)
154 AMesh1Corners[0] = beam[ 0][m];
155 AMesh1Corners[1] = beam[length-1][m];
158 for (j=0; j<length; ++j)
168 CDart * extremities[2];
172 return extremities[0];
176 CDart * AMesh2Corners[2][2],
181 assert(AMesh2Corners!=NULL);
200 for (x=0; x<ASx; ++x)
202 D[x] =
new CDart ** [ASy];
204 for (y=0; y<ASy; ++y)
206 D[x][y] =
new CDart * [8];
213 for (x=0; x<ASx; ++x)
214 for (y=0; y<ASy; ++y)
226 if (x>0)
topoSew2( D[x][y][7] , D[x-1][y ][2] );
227 if (y>0)
topoSew2( D[x][y][0] , D[x ][y-1][5] );
233 for (x=0; x<ASx; ++x)
234 for (y=0; y<ASy; ++y)
238 for (x=0; x<ASx; ++x)
239 for (y=0; y<ASy; ++y)
252 alpha3( D[x-1][y ][2] ) );
254 alpha3( D[x ][y-1][5] ) );
259 AMesh2Corners[0][0] = D[ 0 ][ 0 ][0];
260 AMesh2Corners[1][0] = D[ASx-1][ 0 ][1];
261 AMesh2Corners[0][1] = D[ 0 ][ASy-1][5];
262 AMesh2Corners[1][1] = D[ASx-1][ASy-1][4];
265 for (x=0; x<ASx; ++x)
267 for (y=0; y<ASy; ++y)
281 CDart * mesh2Corners[2][2];
285 return mesh2Corners[0][0];
289 CDart * AMesh3Corners[2][2][2])
294 assert(AMesh3Corners!=NULL);
318 for (x=0; x<ASx; ++x)
320 D[x] =
new CDart *** [ASy];
322 for (y=0; y<ASy; ++y)
324 D[x][y] =
new CDart ** [ASz];
326 for (z=0; z<ASz; ++z)
328 D[x][y][z] =
new CDart * [48];
336 for (x=0; x<ASx; ++x)
337 for (y=0; y<ASy; ++y)
338 for (z=0; z<ASz; ++z)
415 if (x>0)
topoSew3( D[x][y][z][ 0] , D[x-1][y ][z ][ 8] );
416 if (y>0)
topoSew3( D[x][y][z][16] , D[x ][y-1][z ][24] );
417 if (z>0)
topoSew3( D[x][y][z][32] , D[x ][y ][z-1][40] );
420 AMesh3Corners[0][0][0] = D[ 0 ][ 0 ][ 0 ][32];
421 AMesh3Corners[1][0][0] = D[ASx-1][ 0 ][ 0 ][33];
422 AMesh3Corners[0][1][0] = D[ 0 ][ASy-1][ 0 ][37];
423 AMesh3Corners[1][1][0] = D[ASx-1][ASy-1][ 0 ][36];
424 AMesh3Corners[0][0][1] = D[ 0 ][ 0 ][ASz-1][40];
425 AMesh3Corners[1][0][1] = D[ASx-1][ 0 ][ASz-1][41];
426 AMesh3Corners[0][1][1] = D[ 0 ][ASy-1][ASz-1][45];
427 AMesh3Corners[1][1][1] = D[ASx-1][ASy-1][ASz-1][44];
430 for (x=0; x<ASx; ++x)
432 for (y=0; y<ASy; ++y)
434 for (z=0; z<ASz; ++z)
435 delete [] D[x][y][z];
452 CDart * mesh3Corners[2][2][2];
456 return mesh3Corners[0][0][0];