40 CDart* CExtractionImage::oneSameNeighboorF(CDart* d1, CDart* fo1, CDart* fo2,
const CVertex & AVertex)
42 CDart *t1, *t2,*tmp1, *tmp2, *last;
44 t1 = FMap->alpha1(fo1);
46 last=oneSameNeighboorFc(AVertex,d1,fo1,fo2,3);
49 tmp1=FMap->alpha0(t1);
50 tmp2=FMap->alpha0(t2);
55 FMap->topoSew0(tmp1,tmp2);
57 CStaticCoverage23 it(FMap,t1);
60 FMap->delMapDart(FMap->alpha1(*it));
61 FMap->delMapDart(it++);
71 void CExtractionImage::precodesF1F4F7F10( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
73 #ifdef DEBUG_EXTRACT_IMAGE
74 cout<<
"GmapV::precodesF1F4F7F10...";cout.flush();
77 last = FMap->alpha101(oneSameNeighboorF( FMap->alpha010(last), FMap->alpha010(up), FMap->alpha101(behind), AVertex ));
79 #ifdef DEBUG_EXTRACT_IMAGE
88 void CExtractionImage::precodesF2F5F8F11( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
90 #ifdef DEBUG_EXTRACT_IMAGE
91 cout<<
"GmapV::precodesF2F5F8F11...";cout.flush();
94 last = FMap->alpha201(oneSameNeighboorF( FMap->alpha101(up), FMap->alpha010(behind), FMap->alpha010(last), AVertex ));
96 #ifdef DEBUG_EXTRACT_IMAGE
105 void CExtractionImage::precodesF3F6F9F12( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
107 #ifdef DEBUG_EXTRACT_IMAGE
108 cout<<
"GmapV::precodesF3F6F9F12...";cout.flush();
111 last = FMap->alpha12101(oneSameNeighboorF( FMap->alpha101(behind), FMap->alpha0(last), FMap->alpha101(up), AVertex ));
113 #ifdef DEBUG_EXTRACT_IMAGE
122 CDart* CExtractionImage::twoSameNeighboorF1( CDart* d1, CDart* d5, CDart* fo,
const CVertex & AVertex )
124 CDart *t1, *t2,*tmp1, *tmp2, *last;
125 t1= FMap->alpha1(fo);
127 last = twoSameNeighboorFc1(AVertex,d1,d5,fo);
130 tmp1=FMap->alpha0(t1);
131 tmp2=FMap->alpha0(t2);
133 FMap->topoUnsew0(t1);
134 FMap->topoUnsew0(t2);
136 FMap->topoSew0(tmp1,tmp2);
138 CStaticCoverage23 it(FMap,t1);
141 FMap->delMapDart(FMap->alpha1(*it));
142 FMap->delMapDart(it++);
151 void CExtractionImage::precodesF13F19( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
153 #ifdef DEBUG_EXTRACT_IMAGE
154 cout<<
"GmapV::precodesF13F19...";cout.flush();
157 last = FMap->alpha0(twoSameNeighboorF1( FMap->alpha0(last), FMap->alpha101(behind), FMap->alpha010(up), AVertex ));
159 #ifdef DEBUG_EXTRACT_IMAGE
167 void CExtractionImage::precodesF14F20( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
169 #ifdef DEBUG_EXTRACT_IMAGE
170 cout<<
"GmapV::precodesF14F20...";cout.flush();
173 last = FMap->alpha10121(twoSameNeighboorF1( FMap->alpha010(up), FMap->alpha010(last), FMap->alpha010(behind), AVertex ));
175 #ifdef DEBUG_EXTRACT_IMAGE
183 void CExtractionImage::precodesF15F21( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
185 #ifdef DEBUG_EXTRACT_IMAGE
186 cout<<
"GmapV::precodesF15F21...";cout.flush();
189 last = FMap->alpha0102101(twoSameNeighboorF1( FMap->alpha010(behind), FMap->alpha101(up), FMap->alpha0(last), AVertex ));
191 #ifdef DEBUG_EXTRACT_IMAGE
200 CDart* CExtractionImage::twoSameNeighboorF2( CDart* d1, CDart* d5, CDart* fo,
const CVertex & AVertex )
203 CDart *t1, *t2,*tmp1, *tmp2, *last;
206 last = twoSameNeighboorFc2(AVertex,d1,d5,fo);
208 t2 = FMap->alpha1(t1);
209 tmp1 = FMap->alpha0(t1);
210 tmp2 = FMap->alpha0(t2);
212 FMap->topoUnsew0(t1);
213 FMap->topoUnsew0(t2);
214 FMap->topoSew0(tmp1,tmp2);
216 CStaticCoverage23 it(FMap,t1);
219 FMap->delMapDart(FMap->alpha1(*it));
220 FMap->delMapDart(it++);
229 void CExtractionImage::precodesF16F22( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
231 #ifdef DEBUG_EXTRACT_IMAGE
232 cout<<
"GmapV::precodesF16F22...";cout.flush();
235 last = FMap->alpha0(twoSameNeighboorF2( FMap->alpha0(last), FMap->alpha101(behind), FMap->alpha010(up), AVertex ));
237 #ifdef DEBUG_EXTRACT_IMAGE
245 void CExtractionImage::precodesF17F23( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
247 #ifdef DEBUG_EXTRACT_IMAGE
248 cout<<
"GmapV::precodesF17F23...";cout.flush();
251 last = FMap->alpha10121(twoSameNeighboorF2( FMap->alpha010(up), FMap->alpha010(last), FMap->alpha010(behind), AVertex ));
253 #ifdef DEBUG_EXTRACT_IMAGE
261 void CExtractionImage::precodesF18F24( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
263 #ifdef DEBUG_EXTRACT_IMAGE
264 cout<<
"GmapV::precodesF18F24...";cout.flush();
267 last = FMap->alpha0102101(twoSameNeighboorF2( FMap->alpha010(behind), FMap->alpha101(up), FMap->alpha0(last), AVertex ));
269 #ifdef DEBUG_EXTRACT_IMAGE
278 CDart* CExtractionImage::threeSameNeighboorF(CDart* d10, CDart* d50, CDart* fo,
const CVertex & AVertex )
280 CDart *d1,*d2 ,*d3, *d4,*d5 ,*d6,*t1,*t2,*t3,*t4, *t5, *t6, *s1,*s2,*s3,*s4, *s5;
282 d1 = FMap->alpha01(d10);
283 d2 = FMap->alpha01(d1);
284 d3 = FMap->alpha01(fo);
285 d4 = FMap->alpha01(d3);
286 d5 = FMap->alpha1010(d50);
287 d6 = FMap->alpha01(d5);
289 s1 = FMap->alpha0(FMap->alpha2(FMap->alpha1(fo)));
290 s2 = FMap->alpha0(s1);
291 s3 = FMap->alpha1(s2);
292 s4 = FMap->alpha0(s3);
294 s5=FMap->alpha12(d5);
296 FMap->unsew2(FMap->alpha1(d5));
299 FMap->topoUnsew0(s2);
300 FMap->topoUnsew0(s3);
301 FMap->topoSew0(s1,s4);
303 t1 = FMap->alpha01(d2);
304 t2 = FMap->alpha01(t1);
305 t3 = FMap->alpha01(d4);
306 t4 = FMap->alpha01(t3);
307 t5 = FMap->alpha01(d6);
308 t6 = FMap->alpha01(t5);
312 FMap->unsew1(FMap->alpha0(d6));
313 FMap->unsew1(FMap->alpha0(d4));
314 FMap->unsew1(FMap->alpha0(d2));
315 FMap->unsew1(FMap->alpha10(d4));
321 FMap->topoSew2(FMap->alpha01(d1),FMap->alpha1(d2));
322 FMap->topoSew2(FMap->alpha01(d3),FMap->alpha1(d4));
323 FMap->topoSew2(FMap->alpha01(d5),FMap->alpha1(d6));
325 FMap->setVertex(FMap->alpha010(d5),
new CAttributeVertex(AVertex.getX()*
STEP3D_X,
329 FMap->delMapDart(FMap->alpha0(t2));
330 FMap->delMapDart(t2);
331 FMap->delMapDart(FMap->alpha0(t1));
332 FMap->delMapDart(t1);
333 FMap->delMapDart(FMap->alpha0(t4));
334 FMap->delMapDart(t4);
335 FMap->delMapDart(FMap->alpha0(t3));
336 FMap->delMapDart(t3);
337 FMap->delMapDart(FMap->alpha0(t6));
338 FMap->delMapDart(t6);
339 FMap->delMapDart(FMap->alpha0(t5));
340 FMap->delMapDart(t5);
342 CStaticCoverage23 it(FMap,s2);
345 FMap->delMapDart(FMap->alpha1(*it));
346 FMap->delMapDart(it++);
355 void CExtractionImage::precodeF25( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
357 #ifdef DEBUG_EXTRACT_IMAGE
358 cout<<
"GmapV::precodeF25...";cout.flush();
361 last = FMap->alpha10121(threeSameNeighboorF( FMap->alpha010(up), FMap->alpha010(last), FMap->alpha010(behind), AVertex ));
363 #ifdef DEBUG_EXTRACT_IMAGE
369 void CExtractionImage::precodeF26( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
371 #ifdef DEBUG_EXTRACT_IMAGE
372 cout<<
"GmapV::precodeF26...";cout.flush();
375 last = FMap->alpha0102101(threeSameNeighboorF( FMap->alpha010(behind), FMap->alpha101(up), FMap->alpha0(last), AVertex ));
377 #ifdef DEBUG_EXTRACT_IMAGE
383 void CExtractionImage::precodeF27( CDart* &last, CDart* up, CDart* behind,
const CVertex & AVertex )
385 #ifdef DEBUG_EXTRACT_IMAGE
386 cout<<
"GmapV::precodeF27...";cout.flush();
389 last = FMap->alpha0(threeSameNeighboorF( FMap->alpha0(last), FMap->alpha101(behind), FMap->alpha010(up), AVertex ));
391 #ifdef DEBUG_EXTRACT_IMAGE
403 void CExtractionImage::shiftFictiveEdgesForFacesXy( CDart* last, CDart* up, CDart* behind,
int FictiveMark )
405 CDynamicCoverage23 it(FMap,FMap->alpha010(behind));
407 while(*it != FMap->alpha0101(up))
409 FMap->shiftAllFictiveEdges(*it,FictiveMark);
417 void CExtractionImage::shiftFictiveEdgesForFacesXz( CDart* last, CDart* up, CDart* behind,
int FictiveMark )
419 CDynamicCoverage23 it(FMap,FMap->alpha0(last));
421 while(*it != FMap->alpha0101(behind))
423 FMap->shiftAllFictiveEdges(*it,FictiveMark);
431 void CExtractionImage::shiftFictiveEdgesForFacesYz( CDart* last, CDart* up, CDart* behind,
int FictiveMark )
433 CDynamicCoverage23 it(FMap,FMap->alpha01(last));
435 while(*it != FMap->alpha010(up))
437 FMap->shiftAllFictiveEdges(*it,FictiveMark);
448 void CExtractionImage::subcasePrecodesF1F4F7F10( CImage3d & image,
449 unsigned int x,
unsigned int y,
450 CDart* &last, CDart* up, CDart* behind,
451 int level,
const CVertex & AVertex,
int FictiveMark,
452 bool keepFictiveEdges,
bool shiftFictiveEdges )
454 if (keepFictiveEdges)
456 if (shiftFictiveEdges)
458 shiftFictiveEdgesForFacesXy(last,up,behind,FictiveMark);
459 precodesF1F4F7F10(last,up,behind,AVertex);
462 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
463 subcasePrecodeFc7(image,x,y,last,up,behind,2,AVertex,
464 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
466 precodesF1F4F7F10(last,up,behind,AVertex);
469 precodesF1F4F7F10(last,up,behind,AVertex);
474 void CExtractionImage::subcasePrecodesF2F5F8F11( CImage3d & image,
475 unsigned int x,
unsigned int y,
476 CDart* &last, CDart* up, CDart* behind,
477 int level,
const CVertex & AVertex,
int FictiveMark,
478 bool keepFictiveEdges,
bool shiftFictiveEdges )
480 if (keepFictiveEdges)
482 if (shiftFictiveEdges)
484 shiftFictiveEdgesForFacesXz(last,up,behind,FictiveMark);
485 precodesF2F5F8F11(last,up,behind,AVertex);
488 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
489 subcasePrecodeFc8(image,x,y,last,up,behind,2,AVertex,
490 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
492 precodesF2F5F8F11(last,up,behind,AVertex);
495 precodesF2F5F8F11(last,up,behind,AVertex);
500 void CExtractionImage::subcasePrecodesF3F6F9F12( CImage3d & image,
501 unsigned int x,
unsigned int y,
502 CDart* &last, CDart* up, CDart* behind,
503 int level,
const CVertex & AVertex,
int FictiveMark,
504 bool keepFictiveEdges,
bool shiftFictiveEdges )
506 if (keepFictiveEdges)
508 if (shiftFictiveEdges)
510 shiftFictiveEdgesForFacesYz(last,up,behind,FictiveMark);
511 precodesF3F6F9F12(last,up,behind,AVertex);
514 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
515 subcasePrecodeFc9(image,x,y,last,up,behind,2,AVertex,
516 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
518 precodesF3F6F9F12(last,up,behind,AVertex);
521 precodesF3F6F9F12(last,up,behind,AVertex);
526 void CExtractionImage::subcasePrecodesF13F19( CImage3d & image,
527 unsigned int x,
unsigned int y,
528 CDart* &last, CDart* up, CDart* behind,
529 int level,
const CVertex & AVertex,
int FictiveMark,
530 bool keepFictiveEdges,
bool shiftFictiveEdges )
532 if (keepFictiveEdges)
534 if (shiftFictiveEdges)
536 shiftFictiveEdgesForFacesXy(last,up,behind,FictiveMark);
537 precodesF13F19(last,up,behind,AVertex);
540 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
541 subcasePrecodeFc13(image,x,y,last,up,behind,2,AVertex,
542 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
544 precodesF13F19(last,up,behind,AVertex);
547 precodesF13F19(last,up,behind,AVertex);
552 void CExtractionImage::subcasePrecodesF14F20( CImage3d & image,
553 unsigned int x,
unsigned int y,
554 CDart* &last, CDart* up, CDart* behind,
555 int level,
const CVertex & AVertex,
int FictiveMark,
556 bool keepFictiveEdges,
bool shiftFictiveEdges )
558 if (keepFictiveEdges)
560 if (shiftFictiveEdges)
562 shiftFictiveEdgesForFacesXz(last,up,behind,FictiveMark);
563 precodesF14F20(last,up,behind,AVertex);
566 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
567 subcasePrecodeFc14(image,x,y,last,up,behind,2,AVertex,
568 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
570 precodesF14F20(last,up,behind,AVertex);
573 precodesF14F20(last,up,behind,AVertex);
578 void CExtractionImage::subcasePrecodesF15F21( CImage3d & image,
579 unsigned int x,
unsigned int y,
580 CDart* &last, CDart* up, CDart* behind,
581 int level,
const CVertex & AVertex,
int FictiveMark,
582 bool keepFictiveEdges,
bool shiftFictiveEdges )
584 if (keepFictiveEdges)
586 if (shiftFictiveEdges)
588 shiftFictiveEdgesForFacesYz(last,up,behind,FictiveMark);
589 precodesF15F21(last,up,behind,AVertex);
592 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
593 subcasePrecodeFc15(image,x,y,last,up,behind,2,AVertex,
594 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
596 precodesF15F21(last,up,behind,AVertex);
599 precodesF15F21(last,up,behind,AVertex);
604 void CExtractionImage::subcasePrecodesF16F22( CImage3d & image,
605 unsigned int x,
unsigned int y,
606 CDart* &last, CDart* up, CDart* behind,
607 int level,
const CVertex & AVertex,
int FictiveMark,
608 bool keepFictiveEdges,
bool shiftFictiveEdges )
610 if (keepFictiveEdges)
612 if (shiftFictiveEdges)
614 shiftFictiveEdgesForFacesYz(last,up,behind,FictiveMark);
615 precodesF16F22(last,up,behind,AVertex);
618 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
619 subcasePrecodeFc10(image,x,y,last,up,behind,2,AVertex,
620 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
622 precodesF16F22(last,up,behind,AVertex);
625 precodesF16F22(last,up,behind,AVertex);
630 void CExtractionImage::subcasePrecodesF17F23( CImage3d & image,
631 unsigned int x,
unsigned int y,
632 CDart* &last, CDart* up, CDart* behind,
633 int level,
const CVertex & AVertex,
int FictiveMark,
634 bool keepFictiveEdges,
bool shiftFictiveEdges )
636 if (keepFictiveEdges)
638 if (shiftFictiveEdges)
640 shiftFictiveEdgesForFacesXy(last,up,behind,FictiveMark);
641 precodesF17F23(last,up,behind,AVertex);
644 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
645 subcasePrecodeFc11(image,x,y,last,up,behind,2,AVertex,
646 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
648 precodesF17F23(last,up,behind,AVertex);
651 precodesF17F23(last,up,behind,AVertex);
656 void CExtractionImage::subcasePrecodesF18F24( CImage3d & image,
657 unsigned int x,
unsigned int y,
658 CDart* &last, CDart* up, CDart* behind,
659 int level,
const CVertex & AVertex,
int FictiveMark,
660 bool keepFictiveEdges,
bool shiftFictiveEdges )
662 if (keepFictiveEdges)
664 if (shiftFictiveEdges)
666 shiftFictiveEdgesForFacesXz(last,up,behind,FictiveMark);
667 precodesF18F24(last,up,behind,AVertex);
670 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
671 subcasePrecodeFc12(image,x,y,last,up,behind,2,AVertex,
672 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
674 precodesF18F24(last,up,behind,AVertex);
677 precodesF18F24(last,up,behind,AVertex);
682 void CExtractionImage::subcasePrecodeF25( CImage3d & image,
683 unsigned int x,
unsigned int y,
684 CDart* &last, CDart* up, CDart* behind,
685 int level,
const CVertex & AVertex,
int FictiveMark,
686 bool keepFictiveEdges,
bool shiftFictiveEdges )
688 if (keepFictiveEdges)
690 if (shiftFictiveEdges)
692 shiftFictiveEdgesForFacesXz(last,up,behind,FictiveMark);
693 precodeF25(last,up,behind,AVertex);
696 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
697 subcasePrecodeL8(image,x,y,last,up,behind,1,AVertex,
698 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
700 precodeF25(last,up,behind,AVertex);
703 precodeF25(last,up,behind,AVertex);
708 void CExtractionImage::subcasePrecodeF26( CImage3d & image,
709 unsigned int x,
unsigned int y,
710 CDart* &last, CDart* up, CDart* behind,
711 int level,
const CVertex & AVertex,
int FictiveMark,
712 bool keepFictiveEdges,
bool shiftFictiveEdges )
714 if (keepFictiveEdges)
716 if (shiftFictiveEdges)
718 shiftFictiveEdgesForFacesYz(last,up,behind,FictiveMark);
719 precodeF26(last,up,behind,AVertex);
722 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
723 subcasePrecodeL8(image,x,y,last,up,behind,1,AVertex,
724 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
726 precodeF26(last,up,behind,AVertex);
729 precodeF26(last,up,behind,AVertex);
734 void CExtractionImage::subcasePrecodeF27( CImage3d & image,
735 unsigned int x,
unsigned int y,
736 CDart* &last, CDart* up, CDart* behind,
737 int level,
const CVertex & AVertex,
int FictiveMark,
738 bool keepFictiveEdges,
bool shiftFictiveEdges )
740 if (keepFictiveEdges)
742 if (shiftFictiveEdges)
744 shiftFictiveEdgesForFacesXy(last,up,behind,FictiveMark);
745 precodeF27(last,up,behind,AVertex);
748 if (FMap->existFictiveEdgeIncidentTo(FMap->alpha0(last),FictiveMark))
749 subcasePrecodeL8(image,x,y,last,up,behind,1,AVertex,
750 FictiveMark,keepFictiveEdges,shiftFictiveEdges);
752 precodeF27(last,up,behind,AVertex);
755 precodeF27(last,up,behind,AVertex);