26 #include "g-map-vertex.hh"
30 using namespace GMap3d;
32 static string textOrbit[16] =
34 "Dart",
"0",
"1",
"01",
35 "2",
"02",
"12",
"Volume",
36 "3",
"03",
"13",
"Face",
37 "23",
"Edge",
"Vertex",
"Connected component"
41 {
return FParameterSelection->getNbSelectionLevels(); }
44 {
return FParameterSelection->getSelectionLevel(); }
47 {
return FParameterSelection->getNextSelectionLevel(AIndex); }
50 {
return FParameterSelection->getSelectionOrbit(); }
54 FParameterSelection->setSelectionOrbit(AOrbit);
56 string message(
"Selected orbit: orbit ");
62 FParameterSelection->setNextSelectionOrbit();
64 string message(
"Selected orbit: orbit ");
69 {
return FParameterSelection->getHalfSelection(); }
72 { FParameterSelection->setHalfSelection(ABool); }
75 {
return FParameterSelection->getSelectionMark(); }
78 {
return FParameterSelection->getSelectionMark(ALevel); }
81 {
return FParameterSelection->getNextSelectionMark(AIndex); }
84 {
return FParameterSelection->getLastSelectedDart(); }
87 {
return FParameterSelection->getLastSelectedDart(ALevel); }
90 {
return FParameterSelection->getNextLastSelectedDart(AIndex); }
93 { FParameterSelection->unsetLastSelectedDart(); }
96 { FParameterSelection->unsetLastSelectedDart(ALevel); }
99 { FParameterSelection->unsetNextLastSelectedDart(AIndex); }
102 { FParameterSelection->unsetAllLastSelectedDarts(); }
119 assert(ADart != NULL);
127 FParameterSelection->setLastSelectedDart(ALevel, ADart);
139 assert(ADart != NULL);
147 FParameterSelection->unsetLastSelectedDart(ALevel);
160 assert(ADart != NULL);
175 assert(ADart != NULL);
177 if (FParameterSelection->getHalfSelection() &&
183 FParameterSelection->setLastSelectedDart(ALevel, ADart);
196 assert(ADart != NULL);
198 if (FParameterSelection->getHalfSelection() &&
207 FParameterSelection->unsetLastSelectedDart(ALevel);
221 assert(ADart != NULL);
236 if (FMap->getMarkedCells(ORBIT_VERTEX, sel, NULL, &last) != 1)
239 AResult = * FMap->findVertex(last);
254 int nb = FMap->getMarkedCells(ORBIT_VERTEX, sel, last, &d1, &d2);
256 if (nb != 1 && nb != 2)
261 if (FMap->isFree1(last))
264 d2 = FMap->alpha0(d1);
268 AResult = * FMap->findVertex(d1) - * FMap->findVertex(d2);
285 float screen1[3], screen2[3];
286 int xmin, ymin, xmax, ymax;
301 for (CDynamicCoverageAll coverage(FMap); coverage.cont(); ++coverage)
305 v1 = FMap -> getBurstVertex(dart);
306 view -> project(v1.getX(), v1.getY(), v1.getZ(), screen1);
308 if (screen1[0] >= xmin && screen1[1] >= ymin &&
309 screen1[0] <= xmax && screen1[1] <= ymax)
313 v2 = FMap -> computeBurstExtremity(dart);
314 view -> project(v2.getX(), v2.getY(), v2.getZ(), screen2);
316 if (screen2[0] >= xmin && screen2[1] >= ymin &&
317 screen2[0] <= xmax && screen2[1] <= ymax)