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
CGoGN
CGoGN
Commits
b5e420f2
Commit
b5e420f2
authored
Oct 02, 2012
by
untereiner
Browse files
bug fix
parent
b636d120
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/Algo/Multiresolution/map2MR/map2MR_PM.hpp
View file @
b5e420f2
...
...
@@ -54,34 +54,37 @@ template <typename PFP>
void
Map2MR_PM
<
PFP
>::
createPM
(
Algo
::
Decimation
::
SelectorType
s
,
Algo
::
Decimation
::
ApproximatorType
a
,
const
FunctorSelect
&
select
)
{
CGoGNout
<<
" creating approximator and predictor.."
<<
CGoGNflush
;
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
>*
>
pos_v
;
pos_v
.
push_back
(
&
m_position
)
;
switch
(
a
)
{
case
Algo
::
Decimation
::
A_QEM
:
{
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_QEM
<
PFP
>
(
m_map
,
m_
pos
ition
))
;
break
;
}
case
Algo
::
Decimation
::
A_MidEdge
:
{
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
m_
pos
ition
))
;
break
;
}
case
Algo
::
Decimation
::
A_HalfCollapse
:
{
Algo
::
Decimation
::
Predictor_HalfCollapse
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_HalfCollapse
<
PFP
>
(
m_map
,
m_position
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_HalfCollapse
<
PFP
>
(
m_map
,
m_
pos
ition
,
pred
))
;
break
;
}
case
Algo
::
Decimation
::
A_CornerCutting
:
{
Algo
::
Decimation
::
Predictor_CornerCutting
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_CornerCutting
<
PFP
>
(
m_map
,
m_position
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_CornerCutting
<
PFP
>
(
m_map
,
m_
pos
ition
,
pred
))
;
break
;
}
case
Algo
::
Decimation
::
A_TangentPredict1
:
{
Algo
::
Decimation
::
Predictor_TangentPredict1
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_TangentPredict1
<
PFP
>
(
m_map
,
m_position
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
m_
pos
ition
,
pred
))
;
break
;
}
case
Algo
::
Decimation
::
A_TangentPredict2
:
{
Algo
::
Decimation
::
Predictor_TangentPredict2
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_TangentPredict2
<
PFP
>
(
m_map
,
m_position
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
m_
pos
ition
,
pred
))
;
break
;
}
case
Algo
::
Decimation
::
A_QEM
:
{
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_QEM
<
PFP
>
(
m_map
,
pos
_v
))
;
break
;
}
case
Algo
::
Decimation
::
A_MidEdge
:
{
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
pos
_v
))
;
break
;
}
case
Algo
::
Decimation
::
A_
h
HalfCollapse
:
{
Algo
::
Decimation
::
Predictor_HalfCollapse
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_HalfCollapse
<
PFP
>
(
m_map
,
m_position
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_HalfCollapse
<
PFP
>
(
m_map
,
pos
_v
,
pred
))
;
break
;
}
case
Algo
::
Decimation
::
A_CornerCutting
:
{
Algo
::
Decimation
::
Predictor_CornerCutting
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_CornerCutting
<
PFP
>
(
m_map
,
m_position
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_CornerCutting
<
PFP
>
(
m_map
,
pos
_v
,
pred
))
;
break
;
}
case
Algo
::
Decimation
::
A_TangentPredict1
:
{
Algo
::
Decimation
::
Predictor_TangentPredict1
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_TangentPredict1
<
PFP
>
(
m_map
,
m_position
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
pos
_v
,
pred
))
;
break
;
}
case
Algo
::
Decimation
::
A_TangentPredict2
:
{
Algo
::
Decimation
::
Predictor_TangentPredict2
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_TangentPredict2
<
PFP
>
(
m_map
,
m_position
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
pos
_v
,
pred
))
;
break
;
}
}
CGoGNout
<<
"..done"
<<
CGoGNendl
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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