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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
278d906f
Commit
278d906f
authored
Jul 20, 2012
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug importMRDAT
parent
2018e88a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
include/Algo/Import/importMRDAT.h
include/Algo/Import/importMRDAT.h
+5
-5
include/Algo/Import/importMRDAT.hpp
include/Algo/Import/importMRDAT.hpp
+6
-7
No files found.
include/Algo/Import/importMRDAT.h
View file @
278d906f
...
...
@@ -90,20 +90,20 @@ public:
do
{
Dart
next
=
map
.
phi1
(
it
)
;
unsigned
int
emb
=
map
.
getEmbedding
<
VERTEX
>
(
it
)
;
unsigned
int
emb
=
map
.
template
getEmbedding
<
VERTEX
>(
it
)
;
unsigned
int
idx
=
emb
==
v0
?
0
:
emb
==
v1
?
1
:
2
;
map
.
incCurrentLevel
()
;
Dart
dd
=
map
.
phi1
(
next
)
;
unsigned
int
oldEmb
=
map
.
getEmbedding
<
VERTEX
>
(
dd
)
;
unsigned
int
oldEmb
=
map
.
template
getEmbedding
<
VERTEX
>(
dd
)
;
unsigned
int
newEmb
=
vID
[
children
[
0
]
->
indices
[
idx
]]
;
if
(
oldEmb
==
EMBNULL
)
{
map
.
embedOrbit
<
VERTEX
>
(
dd
,
newEmb
)
;
map
.
template
embedOrbit
<
VERTEX
>(
dd
,
newEmb
)
;
map
.
pushLevel
()
;
for
(
unsigned
int
i
=
map
.
getCurrentLevel
()
+
1
;
i
<=
map
.
getMaxLevel
();
++
i
)
{
map
.
setCurrentLevel
(
i
)
;
map
.
embedOrbit
<
VERTEX
>
(
dd
,
newEmb
)
;
map
.
template
embedOrbit
<
VERTEX
>(
dd
,
newEmb
)
;
}
map
.
popLevel
()
;
}
...
...
@@ -120,7 +120,7 @@ public:
do
{
unsigned
int
emb
=
map
.
getEmbedding
<
VERTEX
>
(
it
)
;
unsigned
int
emb
=
map
.
template
getEmbedding
<
VERTEX
>(
it
)
;
unsigned
int
idx
=
emb
==
v0
?
0
:
emb
==
v1
?
1
:
2
;
map
.
incCurrentLevel
()
;
children
[
idx
+
1
]
->
embed
<
PFP
>
(
map
,
it
,
vID
)
;
...
...
include/Algo/Import/importMRDAT.hpp
View file @
278d906f
...
...
@@ -41,14 +41,13 @@ inline void nextNonEmptyLine(std::ifstream& fp, std::string& line)
template
<
typename
PFP
>
bool
importMRDAT
(
typename
PFP
::
MAP
&
map
,
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
,
QuadTree
&
qt
)
{
VertexAttribute
<
typename
PFP
::
VEC3
>
position
=
map
.
template
getAttribute
<
typename
PFP
::
VEC3
>(
VERTEX
,
"position"
)
;
VertexAttribute
<
typename
PFP
::
VEC3
>
position
=
map
.
template
getAttribute
<
typename
PFP
::
VEC3
,
VERTEX
>(
"position"
)
;
if
(
!
position
.
isValid
())
position
=
map
.
template
addAttribute
<
typename
PFP
::
VEC3
>(
VERTEX
,
"position"
)
;
position
=
map
.
template
addAttribute
<
typename
PFP
::
VEC3
,
VERTEX
>(
"position"
)
;
attrNames
.
push_back
(
position
.
name
())
;
AttributeContainer
&
container
=
map
.
getAttributeContainer
(
VERTEX
)
;
AttributeContainer
&
container
=
map
.
template
getAttributeContainer
<
VERTEX
>(
)
;
// open file
std
::
ifstream
fp
(
filename
.
c_str
(),
std
::
ios
::
in
)
;
...
...
@@ -206,7 +205,7 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
unsigned
int
emb
=
qt
.
verticesID
[
idx
]
;
FunctorSetEmb
<
typename
PFP
::
MAP
,
VERTEX
>
fsetemb
(
map
,
emb
)
;
map
.
foreach_dart_of_orbit
<
PFP
::
MAP
::
VERTEX_OF_PARENT
>
(
d
,
fsetemb
)
;
map
.
template
foreach_dart_of_orbit
<
PFP
::
MAP
::
VERTEX_OF_PARENT
>(
d
,
fsetemb
)
;
m
.
mark
(
d
)
;
// mark on the fly to unmark on second loop
vecDartsPerVertex
[
emb
].
push_back
(
d
)
;
// store incident darts for fast adjacency reconstruction
...
...
@@ -223,11 +222,11 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
// darts incident to end vertex of edge
std
::
vector
<
Dart
>&
vec
=
vecDartsPerVertex
[
map
.
phi1
(
d
)]
;
unsigned
int
embd
=
map
.
getEmbedding
<
VERTEX
>
(
d
)
;
unsigned
int
embd
=
map
.
template
getEmbedding
<
VERTEX
>(
d
)
;
Dart
good_dart
=
NIL
;
for
(
typename
std
::
vector
<
Dart
>::
iterator
it
=
vec
.
begin
();
it
!=
vec
.
end
()
&&
good_dart
==
NIL
;
++
it
)
{
if
(
map
.
getEmbedding
<
VERTEX
>
(
map
.
phi1
(
*
it
))
==
embd
)
if
(
map
.
template
getEmbedding
<
VERTEX
>(
map
.
phi1
(
*
it
))
==
embd
)
good_dart
=
*
it
;
}
...
...
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