26 #include "g-map-vertex.hh"
29 using namespace GMap3d;
32 const CTransformationMatrix * AMeshMatrix,
34 bool AMeshWithAdjacentSews,
35 bool AMeshAssociatedCells,
36 int ADirectInfoAlpha0,
int ADirectInfoAssoc)
41 assert(!AMeshWithMerges || ADirectInfoAlpha0>=0);
42 assert( AMeshWithMerges || ADirectInfoAssoc >=0);
47 if (AMeshMatrix == &COONS || AMeshMatrix == NULL)
49 CVertex & V1 = * FMap->findVertex(ADart);
50 CVertex & V2 = * FMap->findVertex(FMap->alpha0(ADart));
63 AMeshWithAdjacentSews, AMeshAssociatedCells,
64 ADirectInfoAlpha0, ADirectInfoAssoc);
67 CDart * first = AMeshWithMerges
68 ? ADart : FMap->getDirectInfoAsDart(ADart, ADirectInfoAssoc);
70 FMap->diveMesh1(first, *diver, CGMapVertex::GMV_CHECK);
77 const CTransformationMatrix * AMeshMatrix,
79 bool AMeshWithAdjacentSews,
80 bool AMeshAssociatedCells,
81 bool AGetAssociatedEmbeddings,
82 int AInitialMeshDim,
int AFinalMeshDim,
83 int ADirectInfoAlpha0,
int ADirectInfoAssoc)
88 assert(0<=AInitialMeshDim && AInitialMeshDim<=1);
89 assert(1<=AFinalMeshDim && AFinalMeshDim <=2);
90 assert(AInitialMeshDim < AFinalMeshDim);
92 ? FMap->getDirectInfoAsDart(ADart, ADirectInfoAssoc) : ADart,
93 ASx,ASy, AInitialMeshDim));
95 assert(FMap->findVertex(ADart)!=NULL);
99 AMeshWithAdjacentSews, AMeshAssociatedCells,
100 AGetAssociatedEmbeddings,
101 AInitialMeshDim, AFinalMeshDim,
102 ADirectInfoAlpha0, ADirectInfoAssoc);
104 assert(FMap->findVertex(ADart)!=NULL);
107 if (AFinalMeshDim==2)
112 AGetAssociatedEmbeddings
113 ? FMap->getDirectInfoAsDart(ADart, ADirectInfoAssoc)
116 assert(FMap->findVertex(geo)!=NULL);
118 if (AMeshMatrix == &COONS || AMeshMatrix == NULL)
122 const CVertex ** bottom =
new const CVertex * [ASx+1];
123 const CVertex ** top =
new const CVertex * [ASx+1];
124 const CVertex ** left =
new const CVertex * [ASy+1];
125 const CVertex ** right =
new const CVertex * [ASy+1];
127 bool already2Meshed = AInitialMeshDim!=1 || AMeshWithMerges;
129 current =
getMesh1Dive(geo, ASx, bottom, already2Meshed);
130 getMesh1Dive(FMap->alpha1(current), ASy, right, already2Meshed);
132 current =
getMesh1Dive(FMap->alpha1(geo), ASy, left, already2Meshed);
133 getMesh1Dive(FMap->alpha1(current), ASx, top, already2Meshed);
149 (
const CVertex **) CP);
156 ? FMap->getDirectInfoAsDart(ADart, ADirectInfoAssoc)
159 FMap->diveMesh2(first, *diver, CGMapVertex::GMV_CHECK);
166 int ASx,
int ASy,
int ASz,
167 const CTransformationMatrix * AMeshMatrix,
168 bool AMeshWithMerges,
169 bool AMeshWithAdjacentSews,
170 bool AMeshAssociatedCells,
171 int AInitialMeshDim,
int AFinalMeshDim,
172 int ,
int ADirectInfoAssoc)
178 assert(0 <= AInitialMeshDim);
179 assert(AInitialMeshDim < AFinalMeshDim);
180 assert(AFinalMeshDim <= 3);
182 assert(
canMesh3(ADart, ASx,ASy,ASz, AInitialMeshDim));
186 AMeshWithAdjacentSews, AMeshAssociatedCells,
187 AInitialMeshDim,AFinalMeshDim, ADirectInfoAssoc);
190 if (AFinalMeshDim==3)
203 other =
getMesh2Dive( ADart , ASx,ASy, bottom,
true, 1);
204 getMesh2Dive(FMap->alpha12 (other), ASy,ASz, right , true );
205 other =
getMesh2Dive(FMap->alpha12 (ADart), ASy,ASz, left ,
true, 1);
206 getMesh2Dive(FMap->alpha12 (other), ASz,ASx, back , true );
207 other =
getMesh2Dive(FMap->alpha1212(ADart), ASz,ASx, front ,
true, 1);
208 getMesh2Dive(FMap->alpha12 (other), ASx,ASy, top , true );
212 FMap->diveMesh3(ADart, diver, CGMapVertex::GMV_CHECK);