Commit 9cb5f9c5 by Pierre Kraemer

cell typing in map2 functions

parent cc4445d8
 ... @@ -59,10 +59,14 @@ int main() ... @@ -59,10 +59,14 @@ int main() // easy way to find the central vertex of the grid // easy way to find the central vertex of the grid Vertex v; Vertex v; // findCell(VERTEX,v,MAP,myMap, position[v] == VEC3(0,0,0) ); foreach_cell_until(myMap, [&] (Vertex it) find_cell(myMap,v, [&](Vertex v) { { return position[v] == VEC3(0,0,0); if (position[it] == VEC3(0,0,0)) { v = it; return true; } return false; }); }); // must test of find ok (if not v.dart is NIL) // must test of find ok (if not v.dart is NIL) ... @@ -73,14 +77,14 @@ int main() ... @@ -73,14 +77,14 @@ int main() // WITH TRAVERSORS: // WITH TRAVERSORS: // find incident faces to vertex // find incident faces to vertex Traversor2VF trvf(myMap,v.dart); Traversor2VF trvf(myMap, v.dart); for (Dart e = trvf.begin(); e != trvf.end(); e = trvf.next()) for (Dart e = trvf.begin(); e != trvf.end(); e = trvf.next()) { { std::cout << "Face of dart "< trvvaf(myMap,v.dart); Traversor2VVaF trvvaf(myMap, v.dart); for (Dart e = trvvaf.begin(); e != trvvaf.end(); e = trvvaf.next()) for (Dart e = trvvaf.begin(); e != trvvaf.end(); e = trvvaf.next()) { { std::cout << "vertex of dart "<(myMap,v,[&](Face f) foreach_incident2(myMap, v, [&](Face f) { { std::cout << "Face of dart "<(myMap,v,[&](Vertex x) foreach_adjacent2(myMap, v, [&](Vertex x) { { std::cout << "vertex of dart "<
 ... @@ -28,9 +28,9 @@ public: ... @@ -28,9 +28,9 @@ public: inline const QString& getName() { return m_name; } inline const QString& getName() { return m_name; } virtual inline unsigned int getOrbit() const = 0; virtual unsigned int getOrbit() const = 0; virtual inline unsigned int getNbSelectedCells() const = 0; virtual unsigned int getNbSelectedCells() const = 0; virtual void rebuild() = 0; virtual void rebuild() = 0; ... @@ -45,7 +45,7 @@ public: ... @@ -45,7 +45,7 @@ public: inline void setMutuallyExclusive(bool b) { m_isMutuallyExclusive = b; } inline void setMutuallyExclusive(bool b) { m_isMutuallyExclusive = b; } inline bool isMutuallyExclusive() const { return m_isMutuallyExclusive; } inline bool isMutuallyExclusive() const { return m_isMutuallyExclusive; } virtual inline void setMutuallyExclusiveSet(const QList& mex) = 0; virtual void setMutuallyExclusiveSet(const QList& mex) = 0; signals: signals: void selectedCellsChanged(); void selectedCellsChanged(); ... ...
 ... @@ -151,10 +151,10 @@ protected: ... @@ -151,10 +151,10 @@ protected: * @param tableIndices the indices table * @param tableIndices the indices table */ */ template template void addTri(typename PFP::MAP& map, Dart d, std::vector& tableIndices) ; void addTri(typename PFP::MAP& map, Face f, std::vector& tableIndices) ; template template inline void addEarTri(typename PFP::MAP& map, Dart d, std::vector& tableIndices, const VertexAttribute* position); inline void addEarTri(typename PFP::MAP& map, Face f, std::vector& tableIndices, const VertexAttribute* position); template template float computeEarAngle(const typename PFP::VEC3& P1, const typename PFP::VEC3& P2, const typename PFP::VEC3& P3, const typename PFP::VEC3& normalPoly); float computeEarAngle(const typename PFP::VEC3& P1, const typename PFP::VEC3& P2, const typename PFP::VEC3& P3, const typename PFP::VEC3& normalPoly); ... @@ -166,7 +166,7 @@ protected: ... @@ -166,7 +166,7 @@ protected: void recompute2Ears(const VertexAttribute& position, VertexPoly* vp, const typename PFP::VEC3& normalPoly, VPMS& ears, bool convex); void recompute2Ears(const VertexAttribute& position, VertexPoly* vp, const typename PFP::VEC3& normalPoly, VPMS& ears, bool convex); template template bool inTriangle(const VEC3& P, const VEC3& normal, const VEC3& Ta, const VEC3& Tb, const VEC3& Tc); bool inTriangle(const VEC3& P, const VEC3& normal, const VEC3& Ta, const VEC3& Tb, const VEC3& Tc); public: public: /** /** ... ...