00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "g-map-vertex.hh"
00026 using namespace GMap3d;
00027
00028 void CGMapVertex::geoSew(CDart * ADart1, CDart * ADart2, int ADim,
00029 bool ARotateCells, bool AScaleCells,
00030 bool ATranslateCells)
00031 {
00032 assert(ADart1!=NULL && ADart2!=NULL);
00033 assert(ADim>=0 && ADim<=3);
00034 assert(canSew(ADart1, ADart2, ADim));
00035
00036 if (ADim!=0 && canPlate(ADart1, ADart2))
00037 plate(ADart1, ADart2, ADim-1, ARotateCells, AScaleCells, ATranslateCells);
00038
00039 sew(ADart1, ADart2, ADim);
00040 }
00041
00042 bool CGMapVertex::intuitiveGeoSew(CDart * ADart1, CDart * ADart2,
00043 bool ARotateCells, bool AScaleCells,
00044 bool ATranslateCells)
00045 {
00046 assert(ADart1!=NULL && ADart2!=NULL);
00047
00048 int dim = getSewDimension(ADart1, ADart2);
00049
00050 bool possible = dim!=4;
00051
00052 if (possible)
00053 geoSew(ADart1, ADart2, dim, ARotateCells, AScaleCells, ATranslateCells);
00054
00055 return possible;
00056 }
00057
00058 void CGMapVertex::geoBorderSew(CDart * ADart1, CDart * ADart2, int ADim,
00059 bool ARotateCells, bool AScaleCells,
00060 bool ATranslateCells)
00061 {
00062 assert(ADart1!=NULL && ADart2!=NULL);
00063 assert(ADim>=0 && ADim<=3);
00064 assert(canSewBorders(ADart1, ADart2, ADim));
00065
00066 if (ADim!=0 && canPlate(ADart1, ADart2))
00067 borderPlate(ADart1, ADart2, ADim, ARotateCells, AScaleCells, ATranslateCells);
00068
00069 borderSew(ADart1, ADart2, ADim);
00070 }
00071
00072 bool CGMapVertex::intuitiveGeoBorderSew(CDart * ADart1, CDart * ADart2,
00073 bool ARotateCells, bool AScaleCells,
00074 bool ATranslateCells)
00075 {
00076 assert(ADart1!=NULL && ADart2!=NULL);
00077
00078 int dim= getBorderDimension(ADart1);
00079
00080 bool possible = dim!=4 && canSewBorders(ADart1, ADart2, dim);
00081
00082 if (possible)
00083 geoBorderSew(ADart1, ADart2, dim, ARotateCells,AScaleCells,ATranslateCells);
00084
00085 return possible;
00086 }
00087