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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Etienne Schmitt
CGoGN
Commits
9086e25d
Commit
9086e25d
authored
Feb 22, 2012
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MRDAT import OK
parent
ea343e85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
31 deletions
+39
-31
include/Algo/Import/importMRDAT.h
include/Algo/Import/importMRDAT.h
+15
-12
include/Algo/Import/importMRDAT.hpp
include/Algo/Import/importMRDAT.hpp
+24
-19
No files found.
include/Algo/Import/importMRDAT.h
View file @
9086e25d
...
...
@@ -91,34 +91,37 @@ public:
map
.
incCurrentLevel
()
;
unsigned
int
emb0
=
vID
[
children
[
0
]
->
indices
[
0
]]
;
unsigned
int
e0
=
map
.
getEmbedding
(
VERTEX
,
map
.
phi2
(
d0
))
;
if
(
!
cm
.
isMarked
(
map
.
phi2
(
d0
)))
Dart
dd0
=
map
.
phi1
(
d0
)
;
unsigned
int
e0
=
map
.
getEmbedding
(
VERTEX
,
dd0
)
;
if
(
!
cm
.
isMarked
(
dd0
))
{
assert
(
e0
==
EMBNULL
)
;
map
.
embedOrbit
(
VERTEX
,
map
.
phi2
(
d0
)
,
emb0
)
;
cm
.
mark
(
map
.
phi2
(
d0
)
)
;
map
.
embedOrbit
(
VERTEX
,
dd0
,
emb0
)
;
cm
.
mark
(
dd0
)
;
}
else
assert
(
e0
==
emb0
)
;
unsigned
int
emb1
=
vID
[
children
[
0
]
->
indices
[
1
]]
;
unsigned
int
e1
=
map
.
getEmbedding
(
VERTEX
,
map
.
phi2
(
d1
))
;
if
(
!
cm
.
isMarked
(
map
.
phi2
(
d1
)))
Dart
dd1
=
map
.
phi1
(
d1
)
;
unsigned
int
e1
=
map
.
getEmbedding
(
VERTEX
,
dd1
)
;
if
(
!
cm
.
isMarked
(
dd1
))
{
assert
(
e1
==
EMBNULL
)
;
map
.
embedOrbit
(
VERTEX
,
map
.
phi2
(
d1
)
,
emb1
)
;
cm
.
mark
(
map
.
phi2
(
d1
)
)
;
map
.
embedOrbit
(
VERTEX
,
dd1
,
emb1
)
;
cm
.
mark
(
dd1
)
;
}
else
assert
(
e1
==
emb1
)
;
unsigned
int
emb2
=
vID
[
children
[
0
]
->
indices
[
2
]]
;
unsigned
int
e2
=
map
.
getEmbedding
(
VERTEX
,
map
.
phi2
(
d2
))
;
if
(
!
cm
.
isMarked
(
map
.
phi2
(
d2
)))
Dart
dd2
=
map
.
phi1
(
d2
)
;
unsigned
int
e2
=
map
.
getEmbedding
(
VERTEX
,
dd2
)
;
if
(
!
cm
.
isMarked
(
dd2
))
{
assert
(
e2
==
EMBNULL
)
;
map
.
embedOrbit
(
VERTEX
,
map
.
phi2
(
d2
)
,
emb2
)
;
cm
.
mark
(
map
.
phi2
(
d2
)
)
;
map
.
embedOrbit
(
VERTEX
,
dd2
,
emb2
)
;
cm
.
mark
(
dd2
)
;
}
else
assert
(
e2
==
emb2
)
;
...
...
include/Algo/Import/importMRDAT.hpp
View file @
9086e25d
...
...
@@ -122,7 +122,9 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
QuadTree
<
PFP
>
qt
;
QuadTreeNode
<
PFP
>*
current
=
NULL
;
unsigned
int
currentLevel
=
-
1
;
unsigned
int
prevNum
=
-
1
;
std
::
vector
<
unsigned
int
>
lastNum
;
lastNum
.
resize
(
depth
+
1
)
;
nextNonEmptyLine
(
fp
,
line
)
;
while
(
line
.
rfind
(
"end"
)
==
std
::
string
::
npos
)
...
...
@@ -139,29 +141,27 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
oss
>>
idx1
;
oss
>>
idx2
;
std
::
cout
<<
num
<<
" ("
<<
currentLevel
<<
")"
;
if
(
root
==
1
)
std
::
cout
<<
" / root"
;
std
::
cout
<<
std
::
endl
;
if
(
root
==
1
)
{
assert
(
num
==
0
)
;
QuadTreeNode
<
PFP
>*
n
=
new
QuadTreeNode
<
PFP
>
()
;
assert
(
depth
+
1
-
verticesLevel
[
idx0
]
==
0
)
;
assert
(
depth
+
1
-
verticesLevel
[
idx1
]
==
0
)
;
assert
(
depth
+
1
-
verticesLevel
[
idx2
]
==
0
)
;
// assert(depth + 1 - verticesLevel[idx0] == 0) ;
// assert(depth + 1 - verticesLevel[idx1] == 0) ;
// assert(depth + 1 - verticesLevel[idx2] == 0) ;
// assert(verticesLevel[idx0] == 1) ;
// assert(verticesLevel[idx1] == 1) ; // pour les exports de triReme
// assert(verticesLevel[idx2] == 1) ;
n
->
indices
[
0
]
=
idx0
;
n
->
indices
[
1
]
=
idx1
;
n
->
indices
[
2
]
=
idx2
;
qt
.
roots
.
push_back
(
n
)
;
current
=
n
;
currentLevel
=
0
;
prevNum
=
0
;
lastNum
[
0
]
=
0
;
}
else
{
if
(
num
==
prevNum
+
1
)
// on lit un autre triangle du même niveau
if
(
num
==
lastNum
[
currentLevel
]
+
1
)
// on lit un autre triangle du même niveau
{
current
=
current
->
parent
->
children
[
num
]
;
}
...
...
@@ -175,19 +175,24 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
}
else
// on remonte d'un niveau
{
assert
(
prevNum
==
3
)
;
assert
(
current
->
parent
->
parent
!=
NULL
)
;
current
=
current
->
parent
->
parent
->
children
[
num
]
;
--
currentLevel
;
assert
(
lastNum
[
currentLevel
]
==
3
)
;
do
{
current
=
current
->
parent
->
parent
->
children
[
num
]
;
--
currentLevel
;
}
while
(
lastNum
[
currentLevel
]
==
3
)
;
}
}
assert
(
depth
+
1
-
verticesLevel
[
idx0
]
<=
currentLevel
)
;
assert
(
depth
+
1
-
verticesLevel
[
idx1
]
<=
currentLevel
)
;
assert
(
depth
+
1
-
verticesLevel
[
idx2
]
<=
currentLevel
)
;
// assert(depth + 1 - verticesLevel[idx0] <= currentLevel) ;
// assert(depth + 1 - verticesLevel[idx1] <= currentLevel) ;
// assert(depth + 1 - verticesLevel[idx2] <= currentLevel) ;
// assert(verticesLevel[idx0] <= currentLevel + 1) ;
// assert(verticesLevel[idx1] <= currentLevel + 1) ; // pour les exports de triReme
// assert(verticesLevel[idx2] <= currentLevel + 1) ;
current
->
indices
[
0
]
=
idx0
;
current
->
indices
[
1
]
=
idx1
;
current
->
indices
[
2
]
=
idx2
;
prevNum
=
num
;
lastNum
[
currentLevel
]
=
num
;
}
nextNonEmptyLine
(
fp
,
line
)
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment