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
0ee31044
Commit
0ee31044
authored
Mar 03, 2011
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import des fichiers de l'iness + IHM3
parent
7dcd9b65
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1100 additions
and
526 deletions
+1100
-526
include/Algo/ImplicitHierarchicalMesh/ihm3.h
include/Algo/ImplicitHierarchicalMesh/ihm3.h
+31
-55
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
+51
-130
include/Algo/ImplicitHierarchicalMesh/subdivision3.h
include/Algo/ImplicitHierarchicalMesh/subdivision3.h
+16
-2
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+409
-179
include/Algo/Import/importInESS.hpp
include/Algo/Import/importInESS.hpp
+417
-69
include/Algo/Modelisation/tetrahedron.hpp
include/Algo/Modelisation/tetrahedron.hpp
+15
-15
include/Topology/map/map3.h
include/Topology/map/map3.h
+2
-2
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
+135
-50
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+24
-24
No files found.
include/Algo/ImplicitHierarchicalMesh/ihm3.h
View file @
0ee31044
...
...
@@ -37,11 +37,8 @@ namespace Algo
namespace
IHM
{
template
<
typename
T
>
class
AttributeHandler_IHM
;
class
ImplicitHierarchicalMap3
:
public
EmbeddedMap3
<
Map3
>
{
template
<
typename
T
>
friend
class
AttributeHandler_IHM
;
public:
unsigned
int
m_curLevel
;
...
...
@@ -53,7 +50,7 @@ public:
AttributeHandler
<
unsigned
int
>
m_edgeId
;
AttributeHandler
<
unsigned
int
>
m_faceId
;
Attrib
MultiVect
<
unsigned
int
>*
m_nextLevelCell
[
NB_ORBITS
]
;
Attrib
uteMultiVector
<
unsigned
int
>*
m_nextLevelCell
[
NB_ORBITS
]
;
public:
ImplicitHierarchicalMap3
()
;
...
...
@@ -62,13 +59,6 @@ public:
void
init
()
;
/***************************************************
* ATTRIBUTES MANAGEMENT *
***************************************************/
template
<
typename
T
>
AttributeHandler_IHM
<
T
>
addAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
;
/***************************************************
* MAP TRAVERSAL *
***************************************************/
...
...
@@ -79,12 +69,12 @@ public:
Dart
phi_1
(
Dart
d
)
;
Dart
phi2
(
Dart
d
)
;
private:
Dart
phi2bis
(
Dart
d
)
;
public:
Dart
phi2
(
Dart
d
)
;
Dart
phi3
(
Dart
d
);
Dart
alpha0
(
Dart
d
);
...
...
@@ -141,13 +131,24 @@ public:
*/
unsigned
int
getNewEdgeId
()
;
/**
* Return the id of the edge of d
*/
unsigned
int
getEdgeId
(
Dart
d
)
;
/**
* Set an edge id to all darts from an orbit of d
*/
//TODO changer l'ordre des parametres
void
setEdgeId
(
Dart
d
,
unsigned
int
i
,
unsigned
int
orbit
);
/***************************************************
* FACE ID MANAGEMENT *
***************************************************/
/**
* Give a new unique id to all the faces of the map
*/
void
initFaceId
()
;
/**
...
...
@@ -155,10 +156,19 @@ public:
*/
unsigned
int
getNewFaceId
()
;
/**
* Return the id of the face of d
*/
unsigned
int
getFaceId
(
Dart
d
)
;
/**
* Set a face id to all darts from an orbit of d
*/
//TODO changer l'ordre des parametres
void
setFaceId
(
Dart
d
,
unsigned
int
i
,
unsigned
int
orbit
);
void
setFaceId
(
unsigned
int
orbit
,
Dart
d
);
/***************************************************
* CELLS INFORMATION *
***************************************************/
...
...
@@ -174,22 +184,22 @@ public:
unsigned
int
edgeLevel
(
Dart
d
)
;
/**
*
*
Return the level of the face of d in the current level map
*/
unsigned
int
faceLevel
(
Dart
d
);
/**
*
*
Return the level of the volume of d in the current level map
*/
unsigned
int
volumeLevel
(
Dart
d
);
/**
*
*
Return the oldest dart of the face of d in the current level map
*/
Dart
faceOldestDart
(
Dart
d
);
/**
*
*
Return the oldest dart of the volume of d in the current level map
*/
Dart
volumeOldestDart
(
Dart
d
);
...
...
@@ -200,52 +210,18 @@ public:
bool
edgeIsSubdivided
(
Dart
d
)
;
/**
*
* Return true if the face of d in the current level map
* has already been subdivided to the next level
*/
bool
faceIsSubdivided
(
Dart
d
)
;
/**
*
* Return true if the volume of d in the current level map
* has already been subdivided to the next level
*/
bool
volumeIsSubdivided
(
Dart
d
);
}
;
template
<
typename
T
>
class
AttributeHandler_IHM
:
public
AttributeHandler
<
T
>
{
public:
typedef
T
DATA_TYPE
;
AttributeHandler_IHM
()
:
AttributeHandler
<
T
>
()
{}
AttributeHandler_IHM
(
GenericMap
*
m
,
unsigned
int
idAttr
)
:
AttributeHandler
<
T
>
(
m
,
idAttr
)
{}
AttribMultiVect
<
T
>*
getDataVector
()
const
{
return
AttributeHandler
<
T
>::
getDataVector
()
;
}
bool
isValid
()
const
{
return
AttributeHandler
<
T
>::
isValid
()
;
}
T
&
operator
[](
Dart
d
)
;
const
T
&
operator
[](
Dart
d
)
const
;
T
&
operator
[](
unsigned
int
a
)
{
return
AttributeHandler
<
T
>::
operator
[](
a
)
;
}
const
T
&
operator
[](
unsigned
int
a
)
const
{
return
AttributeHandler
<
T
>::
operator
[](
a
)
;
}
}
;
}
//namespace IHM
...
...
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
View file @
0ee31044
...
...
@@ -31,32 +31,6 @@ namespace Algo
namespace
IHM
{
/***************************************************
* ATTRIBUTES MANAGEMENT *
***************************************************/
template
<
typename
T
>
AttributeHandler_IHM
<
T
>
ImplicitHierarchicalMap3
::
addAttribute
(
unsigned
int
orbit
,
const
std
::
string
&
nameAttr
)
{
bool
addNextLevelCell
=
false
;
if
(
!
isOrbitEmbedded
(
orbit
))
addNextLevelCell
=
true
;
AttributeHandler
<
T
>
h
=
Map3
::
addAttribute
<
T
>
(
orbit
,
nameAttr
)
;
if
(
addNextLevelCell
)
{
AttribContainer
&
cellCont
=
m_attribs
[
orbit
]
;
unsigned
int
index
=
cellCont
.
addAttribute
<
unsigned
int
>
(
"nextLevelCell"
)
;
AttribMultiVect
<
unsigned
int
>&
amv
=
cellCont
.
getDataVector
<
unsigned
int
>
(
index
)
;
m_nextLevelCell
[
orbit
]
=
&
amv
;
for
(
unsigned
int
i
=
cellCont
.
begin
();
i
<
cellCont
.
end
();
cellCont
.
next
(
i
))
amv
[
i
]
=
EMBNULL
;
}
return
AttributeHandler_IHM
<
T
>
(
this
,
h
.
id
())
;
}
/***************************************************
* MAP TRAVERSAL *
***************************************************/
...
...
@@ -84,7 +58,7 @@ inline Dart ImplicitHierarchicalMap3::phi1(Dart d)
finished
=
true
;
else
{
if
(
m_edgeId
[
it
]
!=
edgeId
)
while
(
m_edgeId
[
it
]
!=
edgeId
)
it
=
Map3
::
phi1
(
phi2bis
(
it
));
}
}
while
(
!
finished
)
;
...
...
@@ -106,7 +80,7 @@ inline Dart ImplicitHierarchicalMap3::phi_1(Dart d)
else
{
it
=
Map3
::
phi_1
(
it
)
;
if
(
m_edgeId
[
it
]
!=
edgeId
)
while
(
m_edgeId
[
it
]
!=
edgeId
)
it
=
Map3
::
phi_1
(
phi2bis
(
it
))
;
}
}
while
(
!
finished
)
;
...
...
@@ -117,20 +91,17 @@ inline Dart ImplicitHierarchicalMap3::phi_1(Dart d)
//TODO A verifier si besoin d'assertion
inline
Dart
ImplicitHierarchicalMap3
::
phi2bis
(
Dart
d
)
{
//assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
unsigned
int
faceId
=
m_faceId
[
d
];
Dart
it
=
d
;
it
=
Map3
::
phi2
(
it
)
;
if
(
m_faceId
[
it
]
==
faceId
)
return
it
;
else
{
while
(
m_faceId
[
it
]
!=
faceId
)
it
=
Map3
::
alpha_2
(
it
);
it
=
Map3
::
phi2
(
Map3
::
phi3
(
it
)
);
return
it
;
}
...
...
@@ -160,48 +131,52 @@ inline Dart ImplicitHierarchicalMap3::alpha0(Dart d)
inline
Dart
ImplicitHierarchicalMap3
::
alpha1
(
Dart
d
)
{
assert
(
m_dartLevel
[
d
]
<=
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
//
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
return
Map3
::
alpha1
(
d
)
;
}
inline
Dart
ImplicitHierarchicalMap3
::
alpha2
(
Dart
d
)
{
assert
(
m_dartLevel
[
d
]
<=
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
Dart
e
=
phi2
(
d
);
Dart
f
=
phi3
(
e
);
if
(
f
!=
e
)
return
f
;
f
=
d
;
e
=
phi3
(
f
);
while
(
e
!=
f
)
{
f
=
phi2
(
e
);
e
=
phi3
(
f
);
}
return
f
;
// assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
//
// Dart e = phi2(d);
// Dart f = phi3(e);
//
// if (f != e)
// return f;
//
// f = d;
// e = phi3(f);
// while (e != f)
// {
// f = phi2(e);
// e = phi3(f);
// }
// return f;
return
Map3
::
alpha2
(
d
);
}
inline
Dart
ImplicitHierarchicalMap3
::
alpha_2
(
Dart
d
)
{
assert
(
m_dartLevel
[
d
]
<=
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
Dart
e
=
phi3
(
d
);
if
(
e
!=
d
)
return
phi2
(
e
);
e
=
d
;
Dart
f
=
phi2
(
d
);
while
(
phi3
(
f
)
!=
f
)
{
e
=
phi3
(
f
);
f
=
phi2
(
e
);
}
return
e
;
// assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
//
// Dart e = phi3(d);
//
// if (e != d)
// return phi2(e);
//
// e = d;
// Dart f = phi2(d);
// while (phi3(f) != f)
// {
// e = phi3(f);
// f = phi2(e);
// }
// return e;
return
Map3
::
alpha_2
(
d
);
}
inline
Dart
ImplicitHierarchicalMap3
::
begin
()
...
...
@@ -222,7 +197,7 @@ inline void ImplicitHierarchicalMap3::next(Dart& d)
do
{
Map3
::
next
(
d
)
;
}
while
(
m_dartLevel
[
d
]
>
m_curLevel
&&
d
!=
Map3
::
end
()
)
;
}
while
(
d
!=
Map3
::
end
()
&&
m_dartLevel
[
d
]
>
m_curLevel
)
;
}
inline
bool
ImplicitHierarchicalMap3
::
foreach_dart_of_vertex
(
Dart
d
,
FunctorType
&
f
)
...
...
@@ -429,26 +404,28 @@ inline unsigned int ImplicitHierarchicalMap3::getFaceId(Dart d)
return
m_faceId
[
d
]
;
}
inline
void
ImplicitHierarchicalMap3
::
setFaceId
(
Dart
d
,
unsigned
int
i
,
unsigned
int
orbit
)
inline
void
ImplicitHierarchicalMap3
::
setFaceId
(
unsigned
int
orbit
,
Dart
d
)
{
//Mise a jour de l'id de face pour les brins autour d'une arete
if
(
orbit
==
EDGE_ORBIT
)
{
Dart
e
=
d
;
unsigned
int
fid
;
do
{
fid
=
getFaceId
(
e
);
m_faceId
[
e
]
=
fid
;
m_faceId
[
Map3
::
phi2
(
e
)]
=
fid
;
m_faceId
[
Map3
::
phi1
(
e
)]
=
m_faceId
[
e
];
e
=
Map3
::
alpha2
(
e
);
}
while
(
e
!=
d
);
}
}
inline
void
ImplicitHierarchicalMap3
::
setFaceId
(
Dart
d
,
unsigned
int
i
,
unsigned
int
orbit
)
{
//Mise a jour de l'id de face pour les brins autour de la face
else
if
(
orbit
==
FACE_ORBIT
)
if
(
orbit
==
FACE_ORBIT
)
{
Dart
e
=
d
;
...
...
@@ -466,6 +443,9 @@ inline void ImplicitHierarchicalMap3::setFaceId(Dart d, unsigned int i, unsigned
else
if
(
orbit
==
DART_ORBIT
)
{
m_faceId
[
d
]
=
i
;
if
(
Map3
::
phi3
(
d
)
!=
d
)
m_faceId
[
Map3
::
phi3
(
d
)]
=
i
;
}
}
...
...
@@ -504,65 +484,6 @@ inline unsigned int ImplicitHierarchicalMap3::edgeLevel(Dart d)
return
r
;
}
template
<
typename
T
>
T
&
AttributeHandler_IHM
<
T
>::
operator
[](
Dart
d
)
{
ImplicitHierarchicalMap3
*
m
=
reinterpret_cast
<
ImplicitHierarchicalMap3
*>
(
this
->
m_map
)
;
assert
(
m
->
m_dartLevel
[
d
]
<=
m
->
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
assert
(
m
->
vertexInsertionLevel
(
d
)
<=
m
->
m_curLevel
||
!
"Access to the embedding of a vertex inserted after current level"
)
;
unsigned
int
orbit
=
AttribContainer
::
orbitAttr
(
this
->
m_id
)
;
unsigned
int
nbSteps
=
m
->
m_curLevel
-
m
->
vertexInsertionLevel
(
d
)
;
unsigned
int
index
=
m
->
getEmbedding
(
d
,
orbit
)
;
if
(
index
==
EMBNULL
&&
nbSteps
==
0
)
{
index
=
m
->
embedNewCell
(
orbit
,
d
)
;
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
index
)
=
EMBNULL
;
return
this
->
m_attrib
->
operator
[](
index
);
}
AttribContainer
&
cont
=
m
->
getAttributeContainer
(
orbit
)
;
unsigned
int
step
=
0
;
while
(
step
<
nbSteps
)
{
step
++
;
unsigned
int
nextIdx
=
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
index
)
;
if
(
nextIdx
==
EMBNULL
)
{
nextIdx
=
m
->
newCell
(
orbit
)
;
m
->
copyCell
(
orbit
,
nextIdx
,
index
)
;
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
index
)
=
nextIdx
;
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
nextIdx
)
=
EMBNULL
;
cont
.
refLine
(
index
)
;
}
index
=
nextIdx
;
}
return
this
->
m_attrib
->
operator
[](
index
);
}
//OK
template
<
typename
T
>
const
T
&
AttributeHandler_IHM
<
T
>::
operator
[](
Dart
d
)
const
{
ImplicitHierarchicalMap3
*
m
=
reinterpret_cast
<
ImplicitHierarchicalMap3
*>
(
this
->
m_map
)
;
assert
(
m
->
m_dartLevel
[
d
]
<=
m
->
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
assert
(
m
->
vertexInsertionLevel
(
d
)
<=
m
->
m_curLevel
||
!
"Access to the embedding of a vertex inserted after current level"
)
;
unsigned
int
orbit
=
AttribContainer
::
orbitAttr
(
this
->
m_id
)
;
unsigned
int
nbSteps
=
m
->
m_curLevel
-
m
->
vertexInsertionLevel
(
d
)
;
unsigned
int
index
=
m
->
getEmbedding
(
d
,
orbit
)
;
unsigned
int
step
=
0
;
while
(
step
<
nbSteps
)
{
step
++
;
unsigned
int
next
=
m
->
m_nextLevelCell
[
orbit
]
->
operator
[](
index
)
;
if
(
next
!=
EMBNULL
)
index
=
next
;
else
break
;
}
return
this
->
m_attrib
->
operator
[](
index
);
}
}
//namespace IHM
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.h
View file @
0ee31044
...
...
@@ -35,14 +35,28 @@ namespace Algo
namespace
IHM
{
enum
SubdivideType
{
S_TRI
,
S_QUAD
}
;
template
<
typename
PFP
>
void
subdivideEdge
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
)
;
template
<
typename
PFP
>
Dart
subdivideFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
);
void
subdivideFace
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
,
SubdivideType
sType
=
S_QUAD
);
template
<
typename
PFP
>
void
subdivideVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
,
SubdivideType
sType
=
S_QUAD
);
template
<
typename
PFP
>
Dart
subdivideFaceTri
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
);
template
<
typename
PFP
>
void
subdivideVolume
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
);
void
subdivideVolume
Tri
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
);
template
<
typename
PFP
>
void
catmullClarck
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
);
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
0ee31044
This diff is collapsed.
Click to expand it.
include/Algo/Import/importInESS.hpp
View file @
0ee31044
...
...
@@ -24,6 +24,8 @@
#include "Algo/Modelisation/polyhedron.h"
#include <vector>
#include "Geometry/bounding_box.h"
#include <set>
namespace
CGoGN
{
...
...
@@ -54,16 +56,45 @@ typename PFP::VEC3 stringToEmb(std::string s)
return
coord
;
}
unsigned
int
gcd
(
unsigned
int
a
,
unsigned
int
b
)
{
while
(
true
)
{
if
(
a
==
0
)
return
b
;
b
%=
a
;
if
(
b
==
0
)
return
a
;
a
%=
b
;
}
}
template
<
typename
PFP
>
bool
importInESS
(
typename
PFP
::
MAP
&
map
,
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
)
{
typedef
typename
PFP
::
VEC3
VEC3
;
unsigned
int
em
;
AttributeHandler
<
VEC3
>
position
=
map
.
template
addAttribute
<
VEC3
>(
VERTEX_ORBIT
,
"position"
)
;
attrNames
.
push_back
(
position
.
name
())
;
AttributeContainer
&
container
=
map
.
getAttributeContainer
(
VERTEX_CELL
)
;
AttributeHandler
<
int
>
objects
=
map
.
template
addAttribute
<
int
>(
FACE_ORBIT
,
"objects"
)
;
attrNames
.
push_back
(
objects
.
name
())
;
//stocker les boundingbox contenu dans le fichier
std
::
vector
<
std
::
pair
<
VEC3
,
VEC3
>
>
coordonnees
;
//tableau de paires (x,y)
coordonnees
.
reserve
(
50
);
//classer les coordonnees en x
std
::
multimap
<
int
,
unsigned
int
>
coordonneesX
;
//classer les coordonnees en y
std
::
multimap
<
int
,
unsigned
int
>
coordonneesY
;
std
::
set
<
int
>
sx
;
std
::
set
<
int
>
sy
;
// open file
std
::
ifstream
fp
(
filename
.
c_str
(),
std
::
ios
::
in
);
...
...
@@ -73,15 +104,20 @@ bool importInESS(typename PFP::MAP& map, const std::string& filename, std::vecto
return
false
;
}
//
// Lecture du fichier
//
std
::
string
line
;
size_t
posData
,
posCoord
;
std
::
string
bg
;
int
count
=
0
;
unsigned
int
size
=
0
;
//two columns cutted
std
::
getline
(
fp
,
line
);
posData
=
line
.
find
(
"
\t
"
);
++
count
;
// First column
//Bounding box : first coord & second coord
...
...
@@ -89,37 +125,17 @@ bool importInESS(typename PFP::MAP& map, const std::string& filename, std::vecto
posCoord
=
bg
.
find
(
") ("
);
VEC3
c1
=
stringToEmb
<
PFP
>
(
bg
.
substr
(
0
,
posCoord
));
VEC3
c2
=
stringToEmb
<
PFP
>
(
bg
.
substr
(
posCoord
+
3
));
std
::
cout
<<
std
::
endl
;
std
::
vector
<
std
::
vector
<
VEC3
>
>
coordonnees
;
//tableau 2D avec les x en fonction des y
coordonnees
.
reserve
(
50
);
//coordonnees.push_back(std::pair<VEC3,VEC3>(c1,c2));
// coordonneesX.insert(std::pair<int, unsigned int >(c1[0],size));
// coordonneesY.insert(std::pair<int, unsigned int >(c1[1],size));
sx
.
insert
(
c1
[
0
]);
sx
.
insert
(
c2
[
0
]);
// Dart d = map.newFace(4);
//
// em = container.insertLine();
// position[em] = c1;
// map.setDartEmbedding(VERTEX_ORBIT, d, em);
// d = map.phi1(d);
//
// em = container.insertLine();
// position[em] = VEC3(c2[0],c1[1],c2[2]);
// map.setDartEmbedding(VERTEX_ORBIT, d, em);
// d = map.phi1(d);
//
// em = container.insertLine();
// position[em] = c2;
// map.setDartEmbedding(VERTEX_ORBIT, d, em);
// d = map.phi1(d);
//
// em = container.insertLine();
// position[em] = VEC3(c1[0],c2[1],c1[2]);
// map.setDartEmbedding(VERTEX_ORBIT, d, em);
// d = map.phi1(d);
// id = container.insertLine();
// position[id] = stringToEmb<PFP>(bg.substr(0, posCoord));
// id = container.insertLine();
// position[id] = stringToEmb<PFP>(bg.substr(posCoord+3));
sy
.
insert
(
c1
[
1
]);
sy
.
insert
(
c2
[
1
]);
size
++
;
while
(
std
::
getline
(
fp
,
line
)
)
{
...
...
@@ -132,46 +148,310 @@ bool importInESS(typename PFP::MAP& map, const std::string& filename, std::vecto
VEC3
c1
=
stringToEmb
<
PFP
>
(
bg
.
substr
(
0
,
posCoord
));
VEC3
c2
=
stringToEmb
<
PFP
>
(
bg
.
substr
(
posCoord
+
3
));
std
::
cout
<<
std
::
endl
;
coordonnees
.
push_back
(
std
::
pair
<
VEC3
,
VEC3
>
(
c1
,
c2
));
// coordonneesX.insert(std::pair<int, unsigned int >(c1[0],size));
// coordonneesY.insert(std::pair<int, unsigned int >(c1[1],size));
sx
.
insert
(
c1
[
0
]);
sx
.
insert
(
c2
[
0
]);
sy
.
insert
(
c1
[
1
]);
sy
.
insert
(
c2
[
1
]);
Dart
d
=
map
.
newFace
(
4
);
em
=
container
.
insertLine
();
position
[
em
]
=
c1
;
map
.
setDartEmbedding
(
VERTEX_ORBIT
,
d
,
em
);
d
=
map
.
phi1
(
d
);
em
=
container
.
insertLine
();
position
[
em
]
=
VEC3
(
c2
[
0
],
c1
[
1
],
c2
[
2
]);
map
.
setDartEmbedding
(
VERTEX_ORBIT
,
d
,
em
);
<