31 using namespace GMap3d;
35 FParameterGMapV(AParameterGMapV),
36 FParameterFace (AParameterFace),
39 assert(FParameterGMapV!=NULL && FParameterFace!=NULL);
47 FParameterGMapV(APrecompile.FParameterGMapV),
49 (APrecompile.FParameterFace->copy())),
52 assert(FParameterGMapV!=NULL && FParameterFace!=NULL);
72 setGMapVertex(static_cast<CParameterGMapVertex *>(AParameter));
75 setFace(static_cast<CParameterFace *>(AParameter));
81 {
return FParameterFace; }
85 assert(AParameterGMapV != NULL);
88 FParameterGMapV = AParameterGMapV;
94 assert(AFace != NULL);
97 FParameterFace = AFace;
107 static void monCombine(GLdouble c[3],
void *d[4], GLfloat w[4],
void **out)
109 GLdouble *nv = (GLdouble *) malloc(
sizeof(GLdouble)*3);
134 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
137 bool bursted1 = ! areEqual(FParameterGMapV->
getDrawingMap()->getBurstCoef(1), 1.0);
138 int treated = FParameterGMapV->
getDrawingMap()->getNewMark();
141 #define WINAPI __stdcall
146 FTess = gluNewTess();
147 gluTessCallback(FTess, GLU_TESS_BEGIN,
148 (GLvoid (
WINAPI *) ( )) & glBegin );
149 gluTessCallback(FTess, GLU_TESS_END,
150 (GLvoid (
WINAPI *) ( )) & glEnd );
151 gluTessCallback(FTess, GLU_TESS_VERTEX,
152 (GLvoid (
WINAPI *) ( )) & glVertex3dv);
153 gluTessCallback(FTess, GLU_TESS_COMBINE,
154 (GLvoid (
WINAPI *) ( )) & monCombine );
164 for (CDynamicCoverageAll it(FParameterGMapV->
getDrawingMap()); it.cont(); ++it)
165 if (! FParameterGMapV->
getDrawingMap()->isMarked(*it, treated))
170 for (CDynamicCoverage012 it2(FParameterGMapV->
getDrawingMap(), *it);
172 if (! FParameterGMapV->
getDrawingMap()->isMarked(*it2, treated))
174 if (FParameterGMapV->
getDrawingMap()->isClosedPolyline(*it2))
178 getNbPolylineVertices(*it2);
179 if (nbSommetsFace > 2)
187 FParameterGMapV->
getDrawingMap()->markOrbit(*it2, ORBIT_01, treated);
193 gluDeleteTess(FTess);
200 assert( ADimension!=0 );
206 CVertex bary = FParameterGMapV->
getMap()->
207 barycenter(ADart, ORBIT_CELL[ADimension]);
218 CCoverage* cov = FParameterGMapV->
getMap()->
219 getDynamicCoverage(ADart, ORBIT_CELL[ADimension]);
221 for ( ; cov->cont(); ++ *cov)
222 c += (
long int) ** cov;
227 r = double(rand())/RAND_MAX;
228 v = double(rand())/RAND_MAX;
229 b = double(rand())/RAND_MAX;
234 glColor4f(r, v, b, FParameterFace->
getBLFace());
240 gluTessBeginPolygon(FTess, NULL);
241 gluTessBeginContour(FTess);
243 GLdouble* data =
new GLdouble[(ABursted ? 6 : 3) * (ANbSommets+1)];
246 int numeroSommet = 0;
249 for (CDynamicCoverage01 cov(FParameterGMapV->
getDrawingMap(), ADart);
253 CVertex & v = FParameterGMapV->
getDrawingMap()->getBurstVertex(* cov);
255 if (cov.prevOperationType() == OP_NONE || pred != v)
257 data[ (numeroSommet*3)] = v.getX();
258 data[1+(numeroSommet*3)] = v.getY();
259 data[2+(numeroSommet*3)] = v.getZ();
261 gluTessVertex(FTess, &data[numeroSommet*3], &data[numeroSommet*3]);
267 gluTessEndContour(FTess);
268 gluTessEndPolygon(FTess);