Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
KennethVanhoey
CGoGN
Commits
4d0c2298
Commit
4d0c2298
authored
Oct 02, 2012
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some changes on edge selectors
parent
395037bf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
5 deletions
+35
-5
include/Algo/Decimation/edgeSelector.h
include/Algo/Decimation/edgeSelector.h
+14
-0
include/Algo/Decimation/edgeSelector.hpp
include/Algo/Decimation/edgeSelector.hpp
+14
-0
include/Algo/Decimation/selector.h
include/Algo/Decimation/selector.h
+2
-0
include/Algo/Multiresolution/map2MR/map2MR_PM.hpp
include/Algo/Multiresolution/map2MR/map2MR_PM.hpp
+5
-5
No files found.
include/Algo/Decimation/edgeSelector.h
View file @
4d0c2298
...
...
@@ -65,6 +65,8 @@ public:
void
updateBeforeCollapse
(
Dart
d
)
{}
void
updateAfterCollapse
(
Dart
d2
,
Dart
dd2
)
;
bool
nextEdgeWithoutUpdates
(
Dart
&
d
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -92,6 +94,8 @@ public:
void
updateBeforeCollapse
(
Dart
d2
)
{}
void
updateAfterCollapse
(
Dart
d2
,
Dart
dd2
)
;
bool
nextEdgeWithoutUpdates
(
Dart
&
d
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -135,6 +139,8 @@ public:
bool
nextEdge
(
Dart
&
d
)
;
void
updateBeforeCollapse
(
Dart
d
)
;
void
updateAfterCollapse
(
Dart
d2
,
Dart
dd2
)
;
bool
nextEdgeWithoutUpdates
(
Dart
&
d
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -184,6 +190,8 @@ public:
bool
nextEdge
(
Dart
&
d
)
;
void
updateBeforeCollapse
(
Dart
d
)
;
void
updateAfterCollapse
(
Dart
d2
,
Dart
dd2
)
;
bool
nextEdgeWithoutUpdates
(
Dart
&
d
);
}
;
template
<
typename
PFP
>
...
...
@@ -233,6 +241,8 @@ public:
bool
nextEdge
(
Dart
&
d
)
;
void
updateBeforeCollapse
(
Dart
d
)
;
void
updateAfterCollapse
(
Dart
d2
,
Dart
dd2
)
;
bool
nextEdgeWithoutUpdates
(
Dart
&
d
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -328,6 +338,8 @@ public:
bool
nextEdge
(
Dart
&
d
)
;
void
updateBeforeCollapse
(
Dart
d
)
;
void
updateAfterCollapse
(
Dart
d2
,
Dart
dd2
)
;
bool
nextEdgeWithoutUpdates
(
Dart
&
d
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -373,6 +385,8 @@ public:
bool
nextEdge
(
Dart
&
d
)
;
void
updateBeforeCollapse
(
Dart
d
)
;
void
updateAfterCollapse
(
Dart
d2
,
Dart
dd2
)
;
bool
nextEdgeWithoutUpdates
(
Dart
&
d
)
{
}
}
;
}
// namespace Decimation
...
...
include/Algo/Decimation/edgeSelector.hpp
View file @
4d0c2298
...
...
@@ -479,6 +479,20 @@ void EdgeSelector_QEM<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
einfo
.
valid
=
true
;
}
template
<
typename
PFP
>
bool
EdgeSelector_QEM
<
PFP
>::
nextEdgeWithoutUpdates
(
Dart
&
d
)
{
if
(
cur
==
edges
.
end
()
||
edges
.
empty
())
return
false
;
EdgeInfo
&
einfo
=
edgeInfo
[(
*
cur
).
second
]
;
einfo
.
valid
=
false
;
edges
.
erase
(
einfo
.
it
)
;
cur
=
edges
.
begin
();
d
=
(
*
cur
).
second
;
return
true
;
}
/************************************************************************************
* QUADRIC ERROR METRIC (Memoryless version) *
************************************************************************************/
...
...
include/Algo/Decimation/selector.h
View file @
4d0c2298
...
...
@@ -75,6 +75,8 @@ public:
virtual
bool
nextEdge
(
Dart
&
d
)
=
0
;
virtual
void
updateBeforeCollapse
(
Dart
d
)
=
0
;
virtual
void
updateAfterCollapse
(
Dart
d2
,
Dart
dd2
)
=
0
;
virtual
bool
nextEdgeWithoutUpdates
(
Dart
&
d
)
=
0
;
}
;
}
// namespace Decimation
...
...
include/Algo/Multiresolution/map2MR/map2MR_PM.hpp
View file @
4d0c2298
...
...
@@ -157,7 +157,7 @@ void Map2MR_PM<PFP>::addNewLevel(unsigned int percentWantedVertices)
Dart
d
;
while
(
!
finished
)
{
if
(
!
m_selector
->
nextEdge
(
d
))
if
(
!
m_selector
->
nextEdge
WithoutUpdates
(
d
))
break
;
if
(
!
me
.
isMarked
(
d
))
...
...
@@ -186,12 +186,12 @@ void Map2MR_PM<PFP>::addNewLevel(unsigned int percentWantedVertices)
edges
.
push_back
(
d
);
}
//std::cout << "nbDeletedVertex : " << nbDeletedVertex << std::endl;
if
(
nbDeletedVertex
>=
nbWantedPerLevel
)
finished
=
true
;
}
std
::
cout
<<
"nbDeletedVertices : "
<<
nbDeletedVertex
<<
std
::
endl
;
//create the new level
m_map
.
addLevelFront
();
...
...
@@ -239,7 +239,7 @@ void Map2MR_PM<PFP>::collapseEdge(Dart d)
m_map
.
incDartLevel
(
m_map
.
phi_1
(
m_map
.
phi2
(
d
)));
m_map
.
incDartLevel
(
m_map
.
phi1
(
m_map
.
phi2
(
d
)));
m_map
.
printMR
();
//
m_map.printMR();
m_map
.
duplicateDartAtOneLevel
(
d
,
0
);
m_map
.
duplicateDartAtOneLevel
(
m_map
.
phi1
(
d
),
0
);
...
...
@@ -255,7 +255,7 @@ void Map2MR_PM<PFP>::collapseEdge(Dart d)
m_map
.
collapseEdge
(
d
);
m_map
.
printMR
();
//
m_map.printMR();
}
...
...
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