Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
6c01192e
Commit
6c01192e
authored
Nov 04, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
specialisation des embeddedMap pour Map et GMap
parent
5559a670
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
2253 additions
and
285 deletions
+2253
-285
Apps/Examples/clipping.h
Apps/Examples/clipping.h
+2
-3
Apps/Examples/extrusionView.cpp
Apps/Examples/extrusionView.cpp
+2
-3
Apps/Examples/frame_manip.cpp
Apps/Examples/frame_manip.cpp
+2
-4
Apps/Examples/miniTest.cpp
Apps/Examples/miniTest.cpp
+2
-3
Apps/Examples/polyhedronsView.cpp
Apps/Examples/polyhedronsView.cpp
+2
-3
Apps/Examples/scene.cpp
Apps/Examples/scene.cpp
+2
-3
Apps/Examples/simpleGMap2.cpp
Apps/Examples/simpleGMap2.cpp
+2
-3
Apps/Examples/ter_meshes.cpp
Apps/Examples/ter_meshes.cpp
+2
-3
Apps/Examples/texturesExample.h
Apps/Examples/texturesExample.h
+2
-3
Apps/Examples/triangulation.cpp
Apps/Examples/triangulation.cpp
+2
-3
Apps/Examples/viewer.h
Apps/Examples/viewer.h
+2
-3
include/Topology/gmap/embeddedGMap2.h
include/Topology/gmap/embeddedGMap2.h
+150
-0
include/Topology/gmap/embeddedGMap3.h
include/Topology/gmap/embeddedGMap3.h
+108
-0
include/Topology/map/embeddedMap2.h
include/Topology/map/embeddedMap2.h
+150
-0
include/Topology/map/embeddedMap3.h
include/Topology/map/embeddedMap3.h
+109
-0
src/Topology/gmap/embeddedGMap2.cpp
src/Topology/gmap/embeddedGMap2.cpp
+497
-0
src/Topology/gmap/embeddedGMap3.cpp
src/Topology/gmap/embeddedGMap3.cpp
+360
-0
src/Topology/map/emap3.cpp
src/Topology/map/emap3.cpp
+0
-251
src/Topology/map/embeddedMap2.cpp
src/Topology/map/embeddedMap2.cpp
+497
-0
src/Topology/map/embeddedMap3.cpp
src/Topology/map/embeddedMap3.cpp
+360
-0
No files found.
Apps/Examples/clipping.h
View file @
6c01192e
...
...
@@ -35,8 +35,7 @@
#include "Utils/qtui.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map3.h"
#include "Topology/generic/embeddedMap3.h"
#include "Topology/map/embeddedMap3.h"
#include "Geometry/vector_gen.h"
#include "Geometry/matrix.h"
...
...
@@ -66,7 +65,7 @@ using namespace CGoGN ;
struct
PFP
:
public
PFP_STANDARD
{
// definition of the map
typedef
EmbeddedMap3
<
Map3
>
MAP
;
typedef
EmbeddedMap3
MAP
;
};
...
...
Apps/Examples/extrusionView.cpp
View file @
6c01192e
...
...
@@ -27,8 +27,7 @@
#include "extrusionView.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h"
#include "Geometry/matrix.h"
...
...
@@ -51,7 +50,7 @@ using namespace CGoGN;
struct
PFP
:
public
PFP_STANDARD
{
// definition de la carte
typedef
EmbeddedMap2
<
Map2
>
MAP
;
typedef
EmbeddedMap2
MAP
;
};
...
...
Apps/Examples/frame_manip.cpp
View file @
6c01192e
...
...
@@ -27,8 +27,7 @@
#include "frame_manip.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h"
#include "Geometry/matrix.h"
...
...
@@ -42,7 +41,6 @@
#include "Utils/Shaders/shaderFlat.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/type_precision.hpp"
#include "glm/gtc/type_ptr.hpp"
...
...
@@ -52,7 +50,7 @@ using namespace CGoGN;
struct
PFP
:
public
PFP_STANDARD
{
// definition de la carte
typedef
EmbeddedMap2
<
Map2
>
MAP
;
typedef
EmbeddedMap2
MAP
;
};
PFP
::
MAP
myMap
;
...
...
Apps/Examples/miniTest.cpp
View file @
6c01192e
...
...
@@ -27,8 +27,7 @@
#include "Utils/glutwin_atb.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/matrix.h"
#include "Geometry/vector_gen.h"
...
...
@@ -51,7 +50,7 @@ using namespace CGoGN ;
struct
PFP
:
public
PFP_STANDARD
{
// definition of the map
typedef
EmbeddedMap2
<
Map2
>
MAP
;
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
...
...
Apps/Examples/polyhedronsView.cpp
View file @
6c01192e
...
...
@@ -27,8 +27,7 @@
#include "polyhedronsView.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h"
#include "Geometry/matrix.h"
...
...
@@ -47,7 +46,7 @@ using namespace CGoGN;
struct
PFP
:
public
PFP_STANDARD
{
// definition de la carte
typedef
EmbeddedMap2
<
Map2
>
MAP
;
typedef
EmbeddedMap2
MAP
;
};
PFP
::
MAP
myMap
;
...
...
Apps/Examples/scene.cpp
View file @
6c01192e
...
...
@@ -27,8 +27,7 @@
#include "Utils/glutwin.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h"
#include "Geometry/matrix.h"
...
...
@@ -49,7 +48,7 @@ using namespace CGoGN;
struct
PFP
:
public
PFP_STANDARD
{
// definition de la carte
typedef
EmbeddedMap2
<
Map2
>
MAP
;
typedef
EmbeddedMap2
MAP
;
};
...
...
Apps/Examples/simpleGMap2.cpp
View file @
6c01192e
...
...
@@ -29,8 +29,7 @@
#include "Utils/glutwin.h"
#include "Topology/generic/parameters.h"
#include "Topology/gmap/gmap2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/gmap/embeddedGMap2.h"
#include "Geometry/matrix.h"
#include "Geometry/vector_gen.h"
...
...
@@ -46,7 +45,7 @@ using namespace CGoGN;
struct
PFP
:
public
PFP_STANDARD
{
// definition of the map
typedef
Embedded
Map2
<
GMap2
>
MAP
;
typedef
Embedded
GMap2
MAP
;
};
PFP
::
MAP
myMap
;
...
...
Apps/Examples/ter_meshes.cpp
View file @
6c01192e
...
...
@@ -27,8 +27,7 @@
#include "Utils/glutwin.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h"
...
...
@@ -47,7 +46,7 @@ using namespace CGoGN ;
struct
PFP
:
public
PFP_STANDARD
{
// definition of the map
typedef
EmbeddedMap2
<
Map2
>
MAP
;
typedef
EmbeddedMap2
MAP
;
};
/**
...
...
Apps/Examples/texturesExample.h
View file @
6c01192e
...
...
@@ -32,8 +32,7 @@
#include "Utils/Shaders/shaderSimpleTexture.h"
#include "Utils/Shaders/shaderTextureMask.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
#include "Algo/Render/GL2/mapRender.h"
...
...
@@ -47,7 +46,7 @@ using namespace CGoGN ;
struct
PFP
:
public
PFP_STANDARD
{
// definition of the map
typedef
EmbeddedMap2
<
Map2
>
MAP
;
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
...
...
Apps/Examples/triangulation.cpp
View file @
6c01192e
...
...
@@ -28,8 +28,7 @@
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h"
...
...
@@ -48,7 +47,7 @@ using namespace CGoGN ;
struct
PFP
:
public
PFP_STANDARD
{
// definition of the map
typedef
EmbeddedMap2
<
Map2
>
MAP
;
typedef
EmbeddedMap2
MAP
;
};
/**
...
...
Apps/Examples/viewer.h
View file @
6c01192e
...
...
@@ -29,8 +29,7 @@
#include "Utils/qtui.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h"
#include "Geometry/matrix.h"
...
...
@@ -53,7 +52,7 @@ using namespace CGoGN ;
struct
PFP
:
public
PFP_STANDARD
{
// definition of the map
typedef
EmbeddedMap2
<
Map2
>
MAP
;
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
...
...
include/Topology/gmap/embeddedGMap2.h
0 → 100644
View file @
6c01192e
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2011, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.u-strasbg.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef __EMBEDDED_GMAP2_H__
#define __EMBEDDED_GMAP2_H__
#include "Topology/gmap/gmap2.h"
namespace
CGoGN
{
/**
* Class of 2-dimensional G-maps
* with managed embeddings
*/
class
EmbeddedGMap2
:
public
GMap2
{
public:
typedef
GMap2
TOPO_MAP
;
/**
* The attributes attached to the old vertex are duplicated on both resulting vertices
* No attribute is attached to the new edge
*/
virtual
void
splitVertex
(
Dart
d
,
Dart
e
)
;
/**
* The attributes attached to the face of d are kept on the resulting face
*/
virtual
bool
deleteVertex
(
Dart
d
)
;
// /**
// * No attribute is attached to the new edge
// * The attributes attached to the face of dart d are kept on the resulting face
// */
// virtual void linkVertices(Dart d, Dart e) ;
/**
* No attribute is attached to the new vertex
* The attributes attached to the old edge are duplicated on both resulting edges
*/
virtual
void
cutEdge
(
Dart
d
)
;
// /**
// * The attributes attached to the edge of d are kept on the resulting edge
// */
// virtual void uncutEdge(Dart d) ;
/**
* Check if the edge of d can be collapsed or not based on some topological conditions
* @param d a dart of the edge to test
* @return true if the edge can be collapsed, false otherwise
*/
bool
edgeCanCollapse
(
Dart
d
)
;
/**
* The attributes attached to the vertex of dart d are kept on the resulting vertex
* See 'collapseDegeneratedFace' to see what can happen to edges attributes
* Nothing has to be done for the faces (some degenerate ones can be deleted)
*/
virtual
Dart
collapseEdge
(
Dart
d
,
bool
delDegenerateFaces
=
true
)
;
/**
* No cell is created or deleted
*/
virtual
bool
flipEdge
(
Dart
d
)
;
/**
* No cell is created or deleted
*/
virtual
bool
flipBackEdge
(
Dart
d
)
;
// /**
// * The attributes attached to the vertex of dart d are kept on the resulting vertex
// * The attributes attached to the face of dart d are overwritten on the face of dart e
// */
// virtual void insertEdgeInVertex(Dart d, Dart e);
// /**
// * The attributes attached to the vertex of dart d are kept on the resulting vertex
// * The attributes attached to the face of dart d are overwritten on the face of dart e
// */
// virtual void removeEdgeFromVertex(Dart d);
/**
* The attributes attached to the vertices of the edge of d are kept on the vertices of the resulting edge
* The attributes attached to the edge of d are kept on the resulting edge
*/
virtual
void
sewFaces
(
Dart
d
,
Dart
e
)
;
/**
* The attributes attached to the vertices of the old edge of d are duplicated on the vertices of both resulting edges
* The attributes attached to the old edge are duplicated on both resulting edges
*/
virtual
void
unsewFaces
(
Dart
d
)
;
/**
* The attributes attached to the edge of d are kept on the resulting edge
*/
virtual
bool
collapseDegeneratedFace
(
Dart
d
);
/**
* No attribute is attached to the new edge
* The attributes attached to the old face are duplicated on both resulting faces
*/
virtual
void
splitFace
(
Dart
d
,
Dart
e
)
;
/**
* The attributes attached to the face of dart d are kept on the resulting face
*/
virtual
bool
mergeFaces
(
Dart
d
)
;
/**
* The attributes attached to the vertices of the face of d are kept on the resulting vertices
* The attributes attached to the edges of the face of d are kept on the resulting edges
*/
virtual
bool
mergeVolumes
(
Dart
d
,
Dart
e
)
;
/**
* No attribute is attached to the new face
*/
virtual
unsigned
int
closeHole
(
Dart
d
);
virtual
bool
check
()
;
}
;
}
// namespace CGoGN
#endif
include/Topology/
map/em
ap3.h
→
include/Topology/
gmap/embeddedGM
ap3.h
View file @
6c01192e
...
...
@@ -22,100 +22,86 @@
* *
*******************************************************************************/
#ifndef __EMAP3_H__
#define __EMAP3_H__
#ifndef __EM
BEDDED_GM
AP3_H__
#define __EM
BEDDED_GM
AP3_H__
#include "Topology/
map/
map3.h"
#include "Topology/
gmap/g
map3.h"
namespace
CGoGN
{
/**
* Class of 3-dimensional
combinatorial
maps
* Class of 3-dimensional
G-
maps
* with managed embeddings
* See Map3 class for comments..
*/
class
E
Map3
:
public
Map3
class
E
mbeddedGMap3
:
public
G
Map3
{
public:
/**
* cut face in two faces between to vertices
* @param d the dart of first vertex
* @param e the dart of second vertex
* @return a dart of the created edge
*/
Dart
cutFace
(
Dart
d
,
Dart
e
);
/**
* cut a face in n faces with a central point
* @param d a dart of the face
* @return a dart of central point
*/
Dart
trianguleFace
(
Dart
d
);
/**
* quadrangule a face in n faces with a central point
* WARNING: edges of faces must already be cutted
* @param d a dart of the face
* @return a dart of central point
*/
Dart
quadranguleFace
(
Dart
d
);
void
embeddxxguledFace
(
Dart
d
,
Dart
n
);
/**
* cut an edge
* @param d a dart of the edge
* @return a dart of middle point
*/
Dart
cutEdge
(
Dart
d
);
/**Collapse an edge (that is deleted) possibly merging its vertices
* If delDegenerateFaces is true, the method checks that no degenerate
* faces are build (faces with less than 3 edges). If it occurs the faces
* are deleted and the adjacencies are updated (see deleteIfDegenerated).
* The new embedding is at the middle of the collapsed edge
* \warning This may produce two distinct vertices if the edge
* was the only link between two border faces
* @param d a dart in the deleted edge
* @param delDegenerateFaces a boolean (default to true)
* @return a dart from the vertex at the middle of the edge
*/
Dart
edgeCollapse
(
Dart
d
,
bool
delDegenerateFaces
=
true
,
bool
delDegenerateVolumes
=
true
);
/**
* start from a volume composed only by triangles
* add tetrahedrons inside the volume
* @param a dart from the volume
* @return a dart from the new tetra (center of the old volume)
typedef
GMap3
TOPO_MAP
;
//!
/*!
*
*/
virtual
void
sewVolumes
(
Dart
d
,
Dart
e
);
//!
/*!
*
*/
virtual
void
unsewVolumes
(
Dart
d
);
//!
/*!
*
*/
virtual
bool
mergeVolumes
(
Dart
d
);
//! Split a face inserting an edge between two vertices
/*! \pre Dart d and e should belong to the same face and be distinct
* @param d dart of first vertex
* @param e dart of second vertex
* @return the dart of the new edge lying in the vertex of d after the cut
*/
Dart
tetrahedrizeVolume
(
Dart
d
);
bool
check
();
/**
* Embed (vertex) the darts of the boundary
* @param m the marker defining the boundary
*/
void
embedBoundaryDarts
(
Marker
m
)
{
for
(
Dart
d
=
this
->
begin
();
d
!=
this
->
end
();
this
->
next
(
d
))
{
if
(
isMarkedDart
(
d
,
m
))
{
copyEmbedding
(
d
,
phi1
(
phi3
(
d
)),
VERTEX
);
}
}
}
/** Flip the edge of d.
* WARNING : works only if the edge is owned by exactly two volumes
* @param d the edge to flip
virtual
void
splitFace
(
Dart
d
,
Dart
e
);
//! Cut the edge of d
/*! @param d a dart of the edge to cut
*/
void
flipEdge
(
Dart
d
);
};
virtual
void
cutEdge
(
Dart
d
);
// //!
// /*!
// *
// */
// virtual Dart cutSpike(Dart d);
// //! Collapse an edge (that is deleted) possibly merging its vertices
// /*! If delDegenerateFaces is true, the method checks that no degenerate
// * faces are build (faces with less than 3 edges). If it occurs the faces
// * are deleted and the adjacencies are updated (see deleteIfDegenerated).
// * \warning This may produce two distinct vertices if the edge
// * was the only link between two border faces
// * @param d a dart in the deleted edge
// * @param delDegenerateFaces a boolean (default to true)
// */
// virtual int collapseEdge(Dart d, bool delDegenerateFaces = true,
// bool delDegenerateVolumes = true);
// //!
// /*!
// *
// */
// virtual void collapseFace(Dart d, bool delDegenerateFaces = true,
// bool delDegenerateVolumes = true);
virtual
unsigned
int
closeHole
(
Dart
d
);
virtual
void
closeMap
(
DartMarker
&
marker
);
virtual
bool
check
();
}
;
}
// namespace CGoGN
...
...
include/Topology/map/embeddedMap2.h
0 → 100644
View file @
6c01192e
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2011, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.u-strasbg.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef __EMBEDDED_MAP2_H__
#define __EMBEDDED_MAP2_H__
#include "Topology/map/map2.h"
namespace
CGoGN
{
/**
* Class of 2-dimensional maps
* with managed embeddings
*/
class
EmbeddedMap2
:
public
Map2
{
public:
typedef
Map2
TOPO_MAP
;
/**
* The attributes attached to the old vertex are duplicated on both resulting vertices
* No attribute is attached to the new edge
*/
virtual
void
splitVertex
(
Dart
d
,
Dart
e
)
;
/**
* The attributes attached to the face of d are kept on the resulting face
*/
virtual
bool
deleteVertex
(
Dart
d
)
;
/**
* No attribute is attached to the new edge
* The attributes attached to the face of dart d are kept on the resulting face
*/
virtual
void
linkVertices
(
Dart
d
,
Dart
e
)
;
/**
* No attribute is attached to the new vertex
* The attributes attached to the old edge are duplicated on both resulting edges
*/
virtual
void
cutEdge
(
Dart
d
)
;
/**
* The attributes attached to the edge of d are kept on the resulting edge
*/
virtual
void
uncutEdge
(
Dart
d
)
;
/**
* Check if the edge of d can be collapsed or not based on some topological conditions
* @param d a dart of the edge to test
* @return true if the edge can be collapsed, false otherwise
*/
bool
edgeCanCollapse
(
Dart
d
)
;
/**
* The attributes attached to the vertex of dart d are kept on the resulting vertex
* See 'collapseDegeneratedFace' to see what can happen to edges attributes
* Nothing has to be done for the faces (some degenerate ones can be deleted)
*/
virtual
Dart
collapseEdge
(
Dart
d
,
bool
delDegenerateFaces
=
true
)
;
/**
* No cell is created or deleted
*/
virtual
bool
flipEdge
(
Dart
d
)
;
/**
* No cell is created or deleted
*/
virtual
bool
flipBackEdge
(
Dart
d
)
;
/**
* The attributes attached to the vertex of dart d are kept on the resulting vertex