28 #include "message-macros.hh"
31 using namespace GMap3d;
35 CBooleanOperations2d::CBooleanOperations2d(CGMapVertex * AMap,
38 bool ACalculateOrientation,
41 ACalculateOrientation, AVertexDI)
58 CPlane plane(
getMap()->regionNormalVector(d1, 0),
59 *
getMap()->findVertex(d1));
63 int nb = cp.
corefine(d1, d2, ACopyMarks);
72 #define a0(d) (getMap()->alpha0(d))
73 #define a1(d) (getMap()->alpha1(d))
74 #define a2(d) (getMap()->alpha2(d))
83 list<CDart*> dart_list[2];
88 for (
int i = 0; i < 2; i++)
89 if (
getMap()->isMarked(*dcc, mark[i]) &&
90 !
getMap()->isMarked(
a1(*dcc), mark[i]))
91 dart_list[i].push_back(
a1(*dcc));
94 for (
int i = 0; i < 2; i++)
95 while (!dart_list[i].empty()) {
96 d = dart_list[i].front(), dart_list[i].pop_front();
98 if (!
getMap()->isMarked(d, mark[i])) {
99 getMap()->setMark(d, mark[i]);
101 if (!
getMap()->isMarked(
a0(d), mark[i]))
102 dart_list[i].push_back(
a0(d));
104 if (!
getMap()->isMarked(
a1(d), mark[i]))
105 dart_list[i].push_back(
a1(d));
107 if ((!
getMap()->isMarked(d, mark[(i + 1) % 2]) ||
108 getMap()->isMarked(
a2(d), mark[(i + 1) % 2])) &&
109 !
getMap()->isMarked(
a2(d), mark[i]))
110 dart_list[i].push_back(
a2(d));