Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hurstel
CGoGN
Commits
200b462f
Commit
200b462f
authored
Jun 24, 2011
by
Thomas
Browse files
ajout fusion sommet, import chemin svg et debug fction geom
parent
3806dbad
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Apps/Tuto/stage_shader.h
View file @
200b462f
...
...
@@ -49,6 +49,8 @@
#include
"Algo/Render/GL2/topo3Render.h"
#include
"Utils/Shaders/shaderSimpleColor.h"
#include
"Utils/cgognStream.h"
#include
"Utils/drawer.h"
...
...
include/Algo/BooleanOperator/mergeVertices.h
0 → 100644
View file @
200b462f
/*******************************************************************************
* 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 __ALGO_BOOLEANOPERATOR_VERTICES_H__
#define __ALGO_BOOLEANOPERATOR_VERTICES_H__
#include
"Geometry/basic.h"
#include
"Geometry/inclusion.h"
#include
"Geometry/orientation.h"
namespace
CGoGN
{
namespace
Algo
{
namespace
BooleanOperator
{
template
<
typename
PFP
>
void
mergeVertex
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
positions
,
Dart
d
,
Dart
e
);
template
<
typename
PFP
>
void
mergeVertices
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
positions
);
}
}
}
#include
"mergeVertices.hpp"
#endif
include/Algo/BooleanOperator/mergeVertices.hpp
0 → 100644
View file @
200b462f
/*******************************************************************************
* 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 *
* *
*******************************************************************************/
namespace
CGoGN
{
namespace
Algo
{
namespace
BooleanOperator
{
template
<
typename
PFP
>
void
mergeVertex
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
positions
,
Dart
d
,
Dart
e
)
{
assert
(
Geom
::
arePointsEquals
(
positions
[
d
],
positions
[
e
])
&&
!
map
.
sameVertex
(
d
,
e
));
Dart
dd
;
do
{
dd
=
map
.
alpha1
(
d
);
map
.
removeEdgeFromVertex
(
dd
);
Dart
ee
=
e
;
do
{
if
(
Geom
::
testOrientation2D
(
positions
[
map
.
phi1
(
dd
)],
positions
[
ee
],
positions
[
map
.
phi1
(
ee
)])
!=
Geom
::
RIGHT
&&
Geom
::
testOrientation2D
(
positions
[
map
.
phi1
(
dd
)],
positions
[
ee
],
positions
[
map
.
phi1
(
map
.
alpha1
(
ee
))])
==
Geom
::
RIGHT
)
{
break
;
}
ee
=
map
.
alpha1
(
ee
);
}
while
(
ee
!=
e
);
map
.
insertEdgeInVertex
(
ee
,
dd
);
}
while
(
dd
!=
d
);
}
template
<
typename
PFP
>
void
mergeVertices
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
positions
)
{
for
(
Dart
d
=
map
.
begin
()
;
d
!=
map
.
end
()
;
map
.
next
(
d
))
{
CellMarker
vM
(
map
,
VERTEX
);
vM
.
mark
(
d
);
for
(
Dart
dd
=
map
.
begin
()
;
dd
!=
map
.
end
()
;
map
.
next
(
dd
))
{
if
(
!
vM
.
isMarked
(
dd
))
{
vM
.
mark
(
dd
);
if
(
Geom
::
arePointsEquals
(
positions
[
d
],
positions
[
dd
]))
{
mergeVertex
<
PFP
>
(
map
,
positions
,
d
,
dd
);
}
}
}
}
}
}
}
}
include/Algo/Export/exportPov.h
View file @
200b462f
...
...
@@ -95,7 +95,7 @@ void exportMeshWire(std::ofstream& out, typename PFP::MAP& map, typename PFP::TV
if
(
position
[
dd
][
0
]
!=
position
[
map
.
phi1
(
dd
)][
0
]
||
position
[
dd
][
1
]
!=
position
[
map
.
phi1
(
dd
)][
1
]
||
position
[
dd
][
2
]
!=
position
[
map
.
phi1
(
dd
)][
2
])
{
out
<<
"cylinder{ "
<<
std
::
endl
;
out
<<
"<"
<<
position
[
dd
][
0
]
<<
","
<<
position
[
dd
][
2
]
<<
","
<<
position
[
dd
][
1
]
<<
">,"
<<
std
::
endl
;
out
<<
"<"
<<
position
[
map
.
phi1
(
dd
)][
0
]
<<
","
<<
position
[
map
.
phi1
(
dd
)][
2
]
<<
","
<<
position
[
map
.
phi1
(
dd
)][
1
]
<<
">,
0
.5"
<<
std
::
endl
;
out
<<
"<"
<<
position
[
map
.
phi1
(
dd
)][
0
]
<<
","
<<
position
[
map
.
phi1
(
dd
)][
2
]
<<
","
<<
position
[
map
.
phi1
(
dd
)][
1
]
<<
">,
1
.5"
<<
std
::
endl
;
out
<<
"}"
<<
std
::
endl
;
}
dd
=
map
.
phi1
(
dd
);
...
...
include/Algo/Import/importSvg.h
View file @
200b462f
...
...
@@ -16,7 +16,7 @@ namespace Import
* @param name the name
* @ return true if node has the good name
*/
bool
chec
h
XmlNode
(
xmlNodePtr
node
,
const
std
::
string
&
name
);
bool
chec
k
XmlNode
(
xmlNodePtr
node
,
const
std
::
string
&
name
);
template
<
typename
PFP
>
bool
importSVG
(
typename
PFP
::
MAP
&
map
,
const
std
::
string
&
filename
,
typename
PFP
::
TVEC3
&
position
,
CellMarker
&
polygons
);
...
...
include/Algo/Import/importSvg.hpp
View file @
200b462f
This diff is collapsed.
Click to expand it.
include/Algo/MovingObjects/particle_cell_2D.h
View file @
200b462f
...
...
@@ -71,6 +71,9 @@ public :
void
edgeState
(
const
VEC3
&
current
,
Geom
::
Orientation2D
sideOfEdge
=
Geom
::
ALIGNED
);
//just an orientation test : check which dart is aimed to leave the current face to reach an other position
Dart
faceOrientationState
(
const
VEC3
&
toward
);
void
faceState
(
const
VEC3
&
current
);
void
move
(
const
VEC3
&
newCurrent
)
...
...
include/Algo/MovingObjects/particle_cell_2D.hpp
View file @
200b462f
...
...
@@ -45,12 +45,6 @@ typename PFP::VEC3 ParticleCell2D<PFP>::intersectLineEdge(const VEC3& pA, const
Geom
::
intersection2DSegmentSegment
(
pA
,
pB
,
q1
,
q2
,
Inter
);
// if(VEC3(Inter-pA).norm()>VEC3(pA-pB).norm()) {
// CGoGNout << "probleme : " << pA << "/" << pB << "/" << q1 << "/" << q2 << "/" << Inter << CGoGNendl;
// CGoGNout << "isPointOnHalf " << Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,m_positions,Inter) << CGoGNendl;
// CGoGNout << "isPointOnHalf " << Algo::Geometry::isPointOnHalfEdge<PFP>(m,m.phi1(d),m_positions,Inter) << CGoGNendl;
// }
return
Inter
;
}
...
...
@@ -74,6 +68,7 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& current)
if
(
Algo
::
Geometry
::
isPointOnVertex
<
PFP
>
(
m
,
d
,
m_positions
,
current
))
{
state
=
VERTEX
;
m_position
=
current
;
return
;
}
else
...
...
@@ -101,6 +96,7 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& current)
}
else
{
m_position
=
current
;
state
=
VERTEX
;
return
;
}
...
...
@@ -176,6 +172,85 @@ void ParticleCell2D<PFP>::edgeState(const VEC3& current, Geom::Orientation2D sid
vertexState
(
current
);
return
;
}
m_position
=
current
;
}
template
<
typename
PFP
>
Dart
ParticleCell2D
<
PFP
>::
faceOrientationState
(
const
VEC3
&
toward
)
{
#ifdef DEBUG
CGoGNout
<<
"faceOrientationState"
<<
d
<<
CGoGNendl
;
#endif
assert
(
std
::
isfinite
(
m_position
[
0
])
&&
std
::
isfinite
(
m_position
[
1
])
&&
std
::
isfinite
(
m_position
[
2
]));
assert
(
std
::
isfinite
(
toward
[
0
])
&&
std
::
isfinite
(
toward
[
1
])
&&
std
::
isfinite
(
toward
[
2
]));
Dart
res
=
d
;
Dart
dd
=
d
;
float
wsoe
=
getOrientationFace
(
toward
,
m_position
,
m
.
phi1
(
res
));
// orientation step
if
(
wsoe
!=
Geom
::
RIGHT
)
{
res
=
m
.
phi1
(
res
);
wsoe
=
getOrientationFace
(
toward
,
m_position
,
m
.
phi1
(
res
));
while
(
wsoe
!=
Geom
::
RIGHT
&&
dd
!=
res
)
{
res
=
m
.
phi1
(
res
);
wsoe
=
getOrientationFace
(
toward
,
m_position
,
m
.
phi1
(
res
));
}
// source and position to reach are the same : verify if no edge is crossed due to numerical approximation
if
(
dd
==
res
)
{
do
{
switch
(
getOrientationEdge
(
toward
,
res
))
{
case
Geom
::
LEFT
:
res
=
m
.
phi1
(
res
);
break
;
case
Geom
::
ALIGNED
:
return
res
;
case
Geom
::
RIGHT
:
return
res
;
}
}
while
(
res
!=
dd
);
return
res
;
}
}
else
{
wsoe
=
getOrientationFace
(
toward
,
m_position
,
d
);
while
(
wsoe
==
Geom
::
RIGHT
&&
m
.
phi_1
(
res
)
!=
dd
)
{
res
=
m
.
phi_1
(
res
);
wsoe
=
getOrientationFace
(
toward
,
m_position
,
res
);
}
// in case of numerical incoherence
if
(
m
.
phi_1
(
res
)
==
dd
&&
wsoe
==
Geom
::
RIGHT
)
{
res
=
m
.
phi_1
(
res
);
do
{
switch
(
getOrientationEdge
(
toward
,
res
))
{
case
Geom
::
LEFT
:
res
=
m
.
phi1
(
res
);
break
;
case
Geom
::
ALIGNED
:
return
res
;
case
Geom
::
RIGHT
:
return
res
;
}
}
while
(
res
!=
dd
);
return
res
;
}
}
return
res
;
}
template
<
typename
PFP
>
...
...
@@ -215,10 +290,11 @@ void ParticleCell2D<PFP>::faceState(const VEC3& current)
case
Geom
::
ALIGNED
:
m_position
=
current
;
edgeState
(
current
);
return
;
case
Geom
::
RIGHT
:
CGoGNout
<<
"smthg went bad "
<<
m_position
<<
" "
<<
current
<<
CGoGNendl
;
CGoGNout
<<
"d1 "
<<
m_positions
[
d
]
<<
" d2 "
<<
m_positions
[
m
.
phi1
(
d
)]
<<
CGoGNendl
;
case
Geom
::
RIGHT
:
// CGoGNout << "smthg went bad " << m_position << " " << current << CGoGNendl;
// CGoGNout << "d1 " << m_positions[d] << " d2 " << m_positions[m.phi1(d)] << CGoGNendl;
m_position
=
intersectLineEdge
(
current
,
m_position
,
d
);
CGoGNout
<<
" "
<<
m_position
<<
CGoGNendl
;
//
CGoGNout << " " << m_position << CGoGNendl;
edgeState
(
current
,
Geom
::
RIGHT
);
return
;
...
...
@@ -265,7 +341,7 @@ void ParticleCell2D<PFP>::faceState(const VEC3& current)
edgeState
(
current
);
return
;
case
Geom
::
RIGHT
:
CGoGNout
<<
"smthg went bad(2) "
<<
m_position
<<
CGoGNendl
;
//
CGoGNout << "smthg went bad(2) " << m_position << CGoGNendl;
m_position
=
intersectLineEdge
(
current
,
m_position
,
d
);
// CGoGNout << " " << m_position << CGoGNendl;
edgeState
(
current
,
Geom
::
RIGHT
);
...
...
@@ -300,6 +376,7 @@ void ParticleCell2D<PFP>::faceState(const VEC3& current)
default
:
if
(
wsoe
==
Geom
::
ALIGNED
)
{
d
=
m
.
phi1
(
d
);
//to check
m_position
=
m_positions
[
d
];
vertexState
(
current
);
}
...
...
include/Container/fakeAttribute.h
View file @
200b462f
...
...
@@ -44,7 +44,7 @@ public:
NoMathNameAttribute
(
const
T
&
att
)
:
T
(
att
)
{}
NoMathNameAttribute
<
T
>&
operator
=
(
const
T
&
fa
)
{
*
this
=
NoMathNameAttribute
<
T
>
(
fa
);
}
NoMathNameAttribute
<
T
>&
operator
=
(
const
T
&
fa
)
{
return
*
this
=
NoMathNameAttribute
<
T
>
(
fa
);
}
void
operator
+=
(
const
NoMathNameAttribute
<
T
>&
fa
)
{}
void
operator
-=
(
const
NoMathNameAttribute
<
T
>&
fa
)
{}
void
operator
*=
(
double
v
)
{}
...
...
include/Geometry/intersection.hpp
View file @
200b462f
...
...
@@ -314,15 +314,28 @@ Intersection intersection2DSegmentSegment(const VEC3& PA, const VEC3& PB, const
{
typedef
typename
VEC3
::
DATA_TYPE
T
;
VEC3
vp1p2
(
PB
);
vp1p2
-=
PA
;
VEC3
vq1q2
(
QB
);
vq1q2
-=
QA
;
VEC3
vp1q1
(
QA
);
vp1q1
-=
PA
;
VEC3
vp1p2
=
PB
-
PA
;
VEC3
vq1q2
=
QB
-
QA
;
VEC3
vp1q1
=
QA
-
PA
;
T
delta
=
vp1p2
[
0
]
*
vq1q2
[
1
]
-
vp1p2
[
1
]
*
vq1q2
[
0
];
T
coeff
=
vp1q1
[
0
]
*
vq1q2
[
1
]
-
vp1q1
[
1
]
*
vq1q2
[
0
];
Inter
=
VEC3
((
PA
[
0
]
*
delta
+
vp1p2
[
0
]
*
coeff
)
/
delta
,(
PA
[
1
]
*
delta
+
vp1p2
[
1
]
*
coeff
)
/
delta
,(
PA
[
2
]
*
delta
+
vp1p2
[
2
]
*
coeff
)
/
delta
);
if
(
delta
==
0
)
//parallel
{
//test if collinear
if
(
coeff
==
0
)
{
//collinear
//TODO : check if there is a common point between the two edges
Inter
=
QA
;
return
EDGE_INTERSECTION
;
}
else
return
NO_INTERSECTION
;
}
else
Inter
=
VEC3
((
PA
[
0
]
*
delta
+
vp1p2
[
0
]
*
coeff
)
/
delta
,(
PA
[
1
]
*
delta
+
vp1p2
[
1
]
*
coeff
)
/
delta
,(
PA
[
2
]
*
delta
+
vp1p2
[
2
]
*
coeff
)
/
delta
);
//test if inter point is outside the edges
if
(
(
Inter
[
0
]
<
PA
[
0
]
&&
Inter
[
0
]
<
PB
[
0
])
||
(
Inter
[
0
]
>
PA
[
0
]
&&
Inter
[
0
]
>
PB
[
0
])
...
...
@@ -332,6 +345,9 @@ Intersection intersection2DSegmentSegment(const VEC3& PA, const VEC3& PB, const
)
return
NO_INTERSECTION
;
if
(
Geom
::
arePointsEquals
(
PA
,
Inter
)
||
Geom
::
arePointsEquals
(
PB
,
Inter
)
||
Geom
::
arePointsEquals
(
QA
,
Inter
)
||
Geom
::
arePointsEquals
(
QB
,
Inter
))
return
VERTEX_INTERSECTION
;
return
EDGE_INTERSECTION
;
}
...
...
include/Geometry/plane_3d.h
View file @
200b462f
...
...
@@ -45,11 +45,14 @@ template <typename T>
class
Plane3D
{
public:
static
std
::
string
CGoGNnameOfType
()
;
/**********************************************/
/* CONSTRUCTORS */
/**********************************************/
Plane3D
();
Plane3D
(
int
d
=
0
);
Plane3D
(
const
Plane3D
<
T
>&
p
);
...
...
include/Geometry/plane_3d.hpp
View file @
200b462f
...
...
@@ -28,13 +28,25 @@ namespace CGoGN
namespace
Geom
{
template
<
typename
T
>
std
::
string
Plane3D
<
T
>::
CGoGNnameOfType
()
{
std
::
stringstream
ss
;
ss
<<
"Geom::Plane3D<"
;
ss
<<
nameOfType
(
T
())
;
ss
<<
">"
;
return
ss
.
str
()
;
}
/**********************************************/
/* CONSTRUCTORS */
/**********************************************/
template
<
typename
T
>
Plane3D
<
T
>::
Plane3D
()
{}
Plane3D
<
T
>::
Plane3D
(
int
d
)
:
m_normal
(
0
),
m_d
(
d
)
{
}
template
<
typename
T
>
Plane3D
<
T
>::
Plane3D
(
const
Plane3D
<
T
>&
p
)
...
...
@@ -110,7 +122,7 @@ void Plane3D<T>::project(Vector<3,T>& p) const
T
d
=
-
distance
(
p
)
;
if
(
abs
(
d
)
>
PRECISION
)
{
Vector
<
3
,
T
>
v
=
m_normal
/
d
;
Vector
<
3
,
T
>
v
=
m_normal
*
d
;
p
+=
v
;
}
#undef PRECISION
...
...
include/Topology/generic/embeddedMap2.h
View file @
200b462f
...
...
@@ -49,6 +49,12 @@ public:
*/
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
...
...
@@ -84,6 +90,18 @@ public:
*/
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
...
...
@@ -107,12 +125,6 @@ public:
*/
virtual
void
splitFace
(
Dart
d
,
Dart
e
)
;
/**
* 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
)
;
/**
* The attributes attached to the face of dart d are kept on the resulting face
*/
...
...
include/Topology/generic/embeddedMap2.hpp
View file @
200b462f
...
...
@@ -66,6 +66,25 @@ bool EmbeddedMap2<MAP2>::deleteVertex(Dart d)
return
false
;
}
template
<
typename
MAP2
>
void
EmbeddedMap2
<
MAP2
>::
linkVertices
(
Dart
d
,
Dart
e
)
{
Dart
dNext
=
MAP2
::
phi1
(
d
)
;
MAP2
::
linkVertices
(
d
,
e
);
if
(
MAP2
::
isOrbitEmbedded
(
VERTEX
))
{
MAP2
::
copyDartEmbedding
(
VERTEX
,
MAP2
::
phi_1
(
e
),
d
)
;
MAP2
::
copyDartEmbedding
(
VERTEX
,
MAP2
::
phi_1
(
d
),
e
)
;
}
if
(
MAP2
::
isOrbitEmbedded
(
FACE
))
{
MAP2
::
embedOrbit
(
FACE
,
dNext
,
MAP2
::
getEmbedding
(
FACE
,
dNext
))
;
}
}
template
<
typename
MAP2
>
void
EmbeddedMap2
<
MAP2
>::
cutEdge
(
Dart
d
)
{
...
...
@@ -218,6 +237,57 @@ bool EmbeddedMap2<MAP2>::flipBackEdge(Dart d)
return
false
;
}
template
<
typename
MAP2
>
void
EmbeddedMap2
<
MAP2
>::
insertEdgeInVertex
(
Dart
d
,
Dart
e
)
{
MAP2
::
insertEdgeInVertex
(
d
,
e
);
if
(
MAP2
::
isOrbitEmbedded
(
VERTEX
))
{
MAP2
::
copyDartEmbedding
(
VERTEX
,
e
,
d
)
;
}
if
(
MAP2
::
isOrbitEmbedded
(
FACE
))
{
if
(
!
MAP2
::
sameFace
(
d
,
e
))
{
MAP2
::
embedNewCell
(
FACE
,
e
);
MAP2
::
copyCell
(
FACE
,
e
,
d
)
;
}
else
{
MAP2
::
embedOrbit
(
FACE
,
d
,
MAP2
::
getEmbedding
(
FACE
,
d
))
;
}
}
}
template
<
typename
MAP2
>
void
EmbeddedMap2
<
MAP2
>::
removeEdgeFromVertex
(
Dart
d
)
{
Dart
dPrev
=
MAP2
::
alpha_1
(
d
);
MAP2
::
removeEdgeFromVertex
(
d
);
if
(
MAP2
::
isOrbitEmbedded
(
VERTEX
))
{
MAP2
::
embedNewCell
(
VERTEX
,
d
);
MAP2
::
copyCell
(
VERTEX
,
d
,
dPrev
);
}
if
(
MAP2
::
isOrbitEmbedded
(
FACE
))
{
if
(
!
MAP2
::
sameFace
(
d
,
dPrev
))
{
MAP2
::
embedNewCell
(
FACE
,
d
);
MAP2
::
copyCell
(
FACE
,
d
,
dPrev
)
;
}
else
{
MAP2
::
embedOrbit
(
FACE
,
d
,
MAP2
::
getEmbedding
(
FACE
,
d
))
;
}
}
}
template
<
typename
MAP2
>
void
EmbeddedMap2
<
MAP2
>::
sewFaces
(
Dart
d
,
Dart
e
)
{
...
...
@@ -320,25 +390,6 @@ void EmbeddedMap2<MAP2>::splitFace(Dart d, Dart e)
}
}
template
<
typename
MAP2
>
void
EmbeddedMap2
<
MAP2
>::
linkVertices
(
Dart
d
,
Dart
e
)
{
Dart
dNext
=
MAP2
::
phi1
(
d
)
;
MAP2
::
linkVertices
(
d
,
e
);
if
(
MAP2
::
isOrbitEmbedded
(
VERTEX
))
{
MAP2
::
copyDartEmbedding
(
VERTEX
,
MAP2
::
phi_1
(
e
),
d
)
;
MAP2
::
copyDartEmbedding
(
VERTEX
,
MAP2
::
phi_1
(
d
),
e
)
;
}
if
(
MAP2
::
isOrbitEmbedded
(
FACE
))
{
MAP2
::
embedOrbit
(
FACE
,
dNext
,
MAP2
::
getEmbedding
(
FACE
,
dNext
))
;
}
}
template
<
typename
MAP2
>
bool
EmbeddedMap2
<
MAP2
>::
mergeFaces
(
Dart
d
)
{
...
...
include/Topology/map/map2.h
View file @
200b462f
...
...
@@ -125,6 +125,13 @@ public:
*/
virtual
bool
deleteVertex
(
Dart
d
)
;
//! 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
* @param d first dart in the face
* @param e second dart in the face
*/
virtual
void
linkVertices
(
Dart
d
,
Dart
e
);