37 #include "attribute-vertex.hh"
56 CVertex result, min, max;
61 int markVertex = G->getNewMark();
64 CDynamicCoverageAll Cgm(G);
65 for (Cgm.reinit(); Cgm.cont(); Cgm++)
70 if (!G->isMarked(dgm, markVertex))
74 CVertex *p = (CAttributeVertex*)alpha;
83 if (p->getX() > max.getX())
85 else if (p->getX() < min.getX())
88 if (p->getY() > max.getY())
90 else if (p->getY() < min.getY())
93 if (p->getZ() > max.getZ())
95 else if (p->getZ() < min.getZ())
100 CCoverage* DCv = G->getDynamicCoverage(dgm, ORBIT_123);
104 G->setMark(**DCv, markVertex);
110 for (Cgm.reinit(); Cgm.cont(); Cgm++)
111 G->unsetMark(*Cgm, markVertex);
112 G->freeMark(markVertex);
115 result.setX((min.getX()+max.getX())/2.0);
116 result.setY((min.getY()+max.getY())/2.0);
117 result.setZ((min.getZ()+max.getZ())/2.0);
140 int markFace = G->getNewMark();
145 G->addAttribute(G->getFirstDart(), ORBIT_0123,
147 Color(0.0, 0.0, 1.0),
148 Color(0.0, 1.0, 0.0),
149 Color(0.8, 0.8, 0.8)));
153 CDynamicCoverageAll Cgm(G);
154 for (Cgm.reinit(); Cgm.cont(); Cgm++)
159 if (!G->isMarked(dgm, markFace))
163 G->setMark(dgm, markFace);
172 CCoverage* DCf = G->getDynamicCoverage(dgm, ORBIT_01);
176 G->setMark(**DCf, markFace);
186 CCoverage* DCf = G->getDynamicCoverage(dgm, ORBIT_01);
194 if (!G->isMarked(d01, markFace))
199 G->setMark(d01, markFace);
207 G->addAttribute(dgm, ORBIT_013,
new Int_Att(nbDarts/2));
215 for (Cgm.reinit(); Cgm.cont(); Cgm++)
216 G->unsetMark(*Cgm, markFace);
217 G->freeMark(markFace);
231 CAttribute * alpha = NULL;
235 int mark = G->getNewMark();
238 CDynamicCoverageAll Cgm(G);
240 Cgm.cont() && (alpha == NULL);
246 if (!G->isMarked(dgm, mark))
249 alpha = G->getAttribute(dgm, o, typeAttr);
255 CCoverage* DC = G->getDynamicCoverage(dgm, o);
259 G->setMark(**DC, mark);
266 for (Cgm.reinit(); Cgm.cont(); Cgm++)
267 G->unsetMark(*Cgm, mark);