Commit 9416a673 authored by Pierre Kraemer's avatar Pierre Kraemer

correction tutos

parent 691f92c8
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
#include <iostream> #include <iostream>
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/map2.h" #include "Topology/map/embeddedMap2.h"
#include "Topology/generic/embeddedMap2.h"
#include <Algo/Geometry/inclusion.h> #include <Algo/Geometry/inclusion.h>
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
...@@ -34,7 +33,7 @@ using namespace CGoGN; ...@@ -34,7 +33,7 @@ using namespace CGoGN;
struct PFP: public PFP_STANDARD struct PFP: public PFP_STANDARD
{ {
// definition of the type of the map // definition of the type of the map
typedef EmbeddedMap2<Map2> MAP; typedef EmbeddedMap2 MAP;
}; };
int main() int main()
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
#include <iostream> #include <iostream>
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/map2.h" #include "Topology/map/embeddedMap2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include "Algo/Import/import.h" #include "Algo/Import/import.h"
...@@ -125,7 +124,7 @@ float Gfont[174*2]={ ...@@ -125,7 +124,7 @@ float Gfont[174*2]={
struct PFP: public PFP_STANDARD struct PFP: public PFP_STANDARD
{ {
// definition of the type of the map // definition of the type of the map
typedef EmbeddedMap2<Map2> MAP; typedef EmbeddedMap2 MAP;
}; };
// declaration of the map // declaration of the map
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#include "tp_master.h" #include "tp_master.h"
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/map2.h" #include "Topology/map/embeddedMap2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include "Geometry/matrix.h" #include "Geometry/matrix.h"
...@@ -57,7 +56,7 @@ using namespace CGoGN; ...@@ -57,7 +56,7 @@ using namespace CGoGN;
struct PFP: public PFP_STANDARD struct PFP: public PFP_STANDARD
{ {
// definition of the map // definition of the map
typedef EmbeddedMap2<Map2> MAP; typedef EmbeddedMap2 MAP;
}; };
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
#include <iostream> #include <iostream>
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/map2.h" #include "Topology/map/embeddedMap2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
...@@ -52,7 +51,7 @@ using namespace CGoGN ; ...@@ -52,7 +51,7 @@ using namespace CGoGN ;
struct PFP: public PFP_STANDARD struct PFP: public PFP_STANDARD
{ {
// definition of the type of the map // definition of the type of the map
typedef EmbeddedMap2<Map2> MAP; typedef EmbeddedMap2 MAP;
}; };
// declaration of the map // declaration of the map
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
#include <iostream> #include <iostream>
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/map3.h" #include "Topology/map/embeddedMap3.h"
#include "Topology/generic/embeddedMap3.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
...@@ -56,7 +55,7 @@ using namespace CGoGN ; ...@@ -56,7 +55,7 @@ using namespace CGoGN ;
struct PFP: public PFP_STANDARD struct PFP: public PFP_STANDARD
{ {
// definition de la carte // definition de la carte
typedef EmbeddedMap3<Map3> MAP; typedef EmbeddedMap3 MAP;
//typedef Map3 MAP; //typedef Map3 MAP;
}; };
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
#include "tuto_mt.h" #include "tuto_mt.h"
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/map2.h" #include "Topology/map/embeddedMap2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
...@@ -54,7 +53,7 @@ using namespace CGoGN ; ...@@ -54,7 +53,7 @@ using namespace CGoGN ;
struct PFP: public PFP_STANDARD struct PFP: public PFP_STANDARD
{ {
// definition of the map // definition of the map
typedef EmbeddedMap2<Map2> MAP; typedef EmbeddedMap2 MAP;
}; };
// declaration of the map // declaration of the map
......
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
#include <iostream> #include <iostream>
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/map2.h" #include "Topology/map/embeddedMap2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h"
#include "Algo/Modelisation/polyhedron.h" #include "Algo/Modelisation/polyhedron.h"
...@@ -53,7 +52,7 @@ using namespace CGoGN; ...@@ -53,7 +52,7 @@ using namespace CGoGN;
struct PFP: public PFP_STANDARD struct PFP: public PFP_STANDARD
{ {
// definition of the type of the map // definition of the type of the map
typedef EmbeddedMap2<Map2> MAP; typedef EmbeddedMap2 MAP;
}; };
class MyQT: public Utils::QT::SimpleQT class MyQT: public Utils::QT::SimpleQT
......
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
#include <iostream> #include <iostream>
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/map2.h" #include "Topology/map/embeddedMap2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
...@@ -44,7 +43,7 @@ using namespace CGoGN ; ...@@ -44,7 +43,7 @@ using namespace CGoGN ;
struct PFP: public PFP_STANDARD struct PFP: public PFP_STANDARD
{ {
// definition of the map // definition of the map
typedef EmbeddedMap2<Map2> MAP; typedef EmbeddedMap2 MAP;
}; };
int main(int argc, char **argv) int main(int argc, char **argv)
......
...@@ -106,7 +106,6 @@ protected: ...@@ -106,7 +106,6 @@ protected:
*/ */
void deleteOrientedFace(Dart d) ; void deleteOrientedFace(Dart d) ;
public: public:
virtual void deleteFace(Dart d) ; virtual void deleteFace(Dart d) ;
//@} //@}
...@@ -123,7 +122,6 @@ public: ...@@ -123,7 +122,6 @@ public:
*/ */
virtual void splitVertex(Dart d, Dart e); virtual void splitVertex(Dart d, Dart e);
//! Delete the vertex of d (works only for internal vertices) //! Delete the vertex of d (works only for internal vertices)
/*! All the faces around the vertex are merged into one face /*! All the faces around the vertex are merged into one face
* @param d a dart of the vertex to delete * @param d a dart of the vertex to delete
...@@ -131,7 +129,6 @@ public: ...@@ -131,7 +129,6 @@ public:
*/ */
virtual bool deleteVertex(Dart d) ; virtual bool deleteVertex(Dart d) ;
//! Link two vertices belonging to distinct faces (add an edge between the two vertices) //! Link two vertices belonging to distinct faces (add an edge between the two vertices)
/*! \pre Dart d and e MUST be different and belong to distinct face /*! \pre Dart d and e MUST be different and belong to distinct face
* @param d first dart in the face * @param d first dart in the face
...@@ -139,19 +136,16 @@ public: ...@@ -139,19 +136,16 @@ public:
*/ */
virtual void linkVertices(Dart d, Dart e); virtual void linkVertices(Dart d, Dart e);
//! Cut the edge of d and its opposite edge if it exists //! Cut the edge of d and its opposite edge if it exists
/*! @param d a dart of the edge to cut /*! @param d a dart of the edge to cut
*/ */
virtual void cutEdge(Dart d); virtual void cutEdge(Dart d);
//! Undo the cut of the edge of d and its opposite edge if it exists //! Undo the cut of the edge of d and its opposite edge if it exists
/*! @param d a dart of the edge to uncut /*! @param d a dart of the edge to uncut
*/ */
virtual void uncutEdge(Dart d); virtual void uncutEdge(Dart d);
//! Collapse an edge (that is deleted) possibly merging its vertices //! Collapse an edge (that is deleted) possibly merging its vertices
/*! If delDegenerateFaces is true, the method checks that no degenerate /*! If delDegenerateFaces is true, the method checks that no degenerate
* faces are built (faces with less than 3 edges). If it occurs the faces * faces are built (faces with less than 3 edges). If it occurs the faces
...@@ -164,7 +158,6 @@ public: ...@@ -164,7 +158,6 @@ public:
*/ */
virtual Dart collapseEdge(Dart d, bool delDegenerateFaces = true); virtual Dart collapseEdge(Dart d, bool delDegenerateFaces = true);
/** /**
* Flip the edge of d (rotation in phi1 order) * Flip the edge of d (rotation in phi1 order)
* WARNING : Works only for non-border edges. * WARNING : Works only for non-border edges.
...@@ -189,14 +182,12 @@ public: ...@@ -189,14 +182,12 @@ public:
*/ */
virtual void insertEdgeInVertex(Dart d, Dart e); virtual void insertEdgeInVertex(Dart d, Dart e);
//! Remove an edge from a vertex orbit //! Remove an edge from a vertex orbit
/*! \pre Dart d must be phi2 sewn /*! \pre Dart d must be phi2 sewn
* @param d the dart of the edge to remove from the vertex * @param d the dart of the edge to remove from the vertex
*/ */
virtual void removeEdgeFromVertex(Dart d); virtual void removeEdgeFromVertex(Dart d);
//! Sew two oriented faces along oriented edges //! Sew two oriented faces along oriented edges
/*! \pre Darts d & e MUST be fixed point of phi2 relation /*! \pre Darts d & e MUST be fixed point of phi2 relation
* @param d a dart of the first face * @param d a dart of the first face
...@@ -204,13 +195,11 @@ public: ...@@ -204,13 +195,11 @@ public:
*/ */
virtual void sewFaces(Dart d, Dart e); virtual void sewFaces(Dart d, Dart e);
//! Unsew two oriented faces along oriented edges //! Unsew two oriented faces along oriented edges
/*! @param d a dart of one face /*! @param d a dart of one face
*/ */
virtual void unsewFaces(Dart d); virtual void unsewFaces(Dart d);
//! Delete an oriented face if and only if it has one or two edges //! Delete an oriented face if and only if it has one or two edges
/*! If the face is phi2-linked to two distinct adjacent faces, /*! If the face is phi2-linked to two distinct adjacent faces,
* then those two faces are phi2-linked * then those two faces are phi2-linked
...@@ -219,7 +208,6 @@ public: ...@@ -219,7 +208,6 @@ public:
*/ */
virtual bool collapseDegeneratedFace(Dart d); virtual bool collapseDegeneratedFace(Dart d);
//! Split a face f between d and e inserting an edge between vertices d & e //! Split a face f between d and e inserting an edge between vertices d & e
/*! \pre Darts d & e MUST belong to the same face /*! \pre Darts d & e MUST belong to the same face
* @param d first dart in face f * @param d first dart in face f
...@@ -241,7 +229,6 @@ public: ...@@ -241,7 +229,6 @@ public:
*/ */
void extractTrianglePair(Dart d) ; void extractTrianglePair(Dart d) ;
/** /**
* Insert a pair of sewed triangles in a vertex by exploding the edges of v1 and v2 * Insert a pair of sewed triangles in a vertex by exploding the edges of v1 and v2
* v1 and v2 belong to the same vertex * v1 and v2 belong to the same vertex
...@@ -249,7 +236,6 @@ public: ...@@ -249,7 +236,6 @@ public:
*/ */
void insertTrianglePair(Dart d, Dart v1, Dart v2) ; void insertTrianglePair(Dart d, Dart v1, Dart v2) ;
/** /**
* Unsew the faces consisting of the umbrella of a vertex * Unsew the faces consisting of the umbrella of a vertex
* \warning Darts may have * \warning Darts may have
...@@ -257,7 +243,6 @@ public: ...@@ -257,7 +243,6 @@ public:
*/ */
void unsewAroundVertex(Dart d) ; void unsewAroundVertex(Dart d) ;
/** /**
* Unsew the Umbrella aroud a vertex, close the hole and then * Unsew the Umbrella aroud a vertex, close the hole and then
* create a symetric to construct a polyedron * create a symetric to construct a polyedron
...@@ -265,7 +250,6 @@ public: ...@@ -265,7 +250,6 @@ public:
*/ */
void explodPolyhedron(Dart d); void explodPolyhedron(Dart d);
//! Merge two volumes along two faces. //! Merge two volumes along two faces.
/*! Works only if the two faces have the same number of edges. /*! Works only if the two faces have the same number of edges.
* The faces adjacent to the two given faces are pairwise phi2-linked * The faces adjacent to the two given faces are pairwise phi2-linked
...@@ -278,7 +262,6 @@ public: ...@@ -278,7 +262,6 @@ public:
*/ */
virtual bool mergeVolumes(Dart d, Dart e); virtual bool mergeVolumes(Dart d, Dart e);
//! Close a topological hole (a sequence of connected fixed point of phi2). //! Close a topological hole (a sequence of connected fixed point of phi2).
/*! \pre dart d MUST be fixed point of phi2 relation /*! \pre dart d MUST be fixed point of phi2 relation
* Add a face to the map that closes the hole. * Add a face to the map that closes the hole.
...@@ -288,7 +271,6 @@ public: ...@@ -288,7 +271,6 @@ public:
*/ */
virtual unsigned int closeHole(Dart d); virtual unsigned int closeHole(Dart d);
//TODO a mettre en algo //TODO a mettre en algo
//! Close the map removing topological holes. //! Close the map removing topological holes.
/*! Add faces to the map that close every existing hole. /*! Add faces to the map that close every existing hole.
......
...@@ -430,14 +430,13 @@ bool Map2::sameOrientedVertex(Dart d, Dart e) ...@@ -430,14 +430,13 @@ bool Map2::sameOrientedVertex(Dart d, Dart e)
bool Map2::sameOrientedFace(Dart d, Dart e) bool Map2::sameOrientedFace(Dart d, Dart e)
{ {
Dart dNext = d; Dart dNext = d;
do //Foreach dart dNext of the face do // Foreach dart dNext in the face of d
{ {
if(dNext == e) //Test equality with e if(dNext == e) // Test equality with e
return true; return true;
dNext = phi1(dNext); dNext = phi1(dNext);
} } while(dNext != d);
while(dNext != d); return false; // None is equal to e => faces are distinct
return false; // None is equal to e => Faces are distinct
} }
unsigned int Map2::vertexDegree(Dart d) unsigned int Map2::vertexDegree(Dart d)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment