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
ce89d70a
Commit
ce89d70a
authored
Jan 14, 2013
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Surface namespace in ProgressiveMesh
parent
03e6495a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
47 deletions
+57
-47
include/Algo/ProgressiveMesh/pmesh.h
include/Algo/ProgressiveMesh/pmesh.h
+5
-0
include/Algo/ProgressiveMesh/pmesh.hpp
include/Algo/ProgressiveMesh/pmesh.hpp
+48
-45
include/Algo/ProgressiveMesh/vsplit.h
include/Algo/ProgressiveMesh/vsplit.h
+4
-2
No files found.
include/Algo/ProgressiveMesh/pmesh.h
View file @
ce89d70a
...
@@ -41,6 +41,9 @@ namespace CGoGN
...
@@ -41,6 +41,9 @@ namespace CGoGN
namespace
Algo
namespace
Algo
{
{
namespace
Surface
{
namespace
PMesh
namespace
PMesh
{
{
...
@@ -126,6 +129,8 @@ private:
...
@@ -126,6 +129,8 @@ private:
}
//namespace PMesh
}
//namespace PMesh
}
// Surface
}
//namespace Algo
}
//namespace Algo
}
//namespace CGoGN
}
//namespace CGoGN
...
...
include/Algo/ProgressiveMesh/pmesh.hpp
View file @
ce89d70a
...
@@ -30,13 +30,16 @@ namespace CGoGN
...
@@ -30,13 +30,16 @@ namespace CGoGN
namespace
Algo
namespace
Algo
{
{
namespace
Surface
{
namespace
PMesh
namespace
PMesh
{
{
template
<
typename
PFP
>
template
<
typename
PFP
>
ProgressiveMesh
<
PFP
>::
ProgressiveMesh
(
ProgressiveMesh
<
PFP
>::
ProgressiveMesh
(
MAP
&
map
,
DartMarker
&
inactive
,
MAP
&
map
,
DartMarker
&
inactive
,
Algo
::
Decimation
::
SelectorType
s
,
Algo
::
Decimation
::
ApproximatorType
a
,
Algo
::
Surface
::
Decimation
::
SelectorType
s
,
Algo
::
Surface
::
Decimation
::
ApproximatorType
a
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
)
:
)
:
m_map
(
map
),
positionsTable
(
position
),
inactiveMarker
(
inactive
),
dartSelect
(
inactiveMarker
)
m_map
(
map
),
positionsTable
(
position
),
inactiveMarker
(
inactive
),
dartSelect
(
inactiveMarker
)
...
@@ -47,31 +50,31 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
...
@@ -47,31 +50,31 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
pos_v
.
push_back
(
&
positionsTable
)
;
pos_v
.
push_back
(
&
positionsTable
)
;
switch
(
a
)
switch
(
a
)
{
{
case
Algo
::
Decimation
::
A_QEM
:
{
case
Algo
::
Surface
::
Decimation
::
A_QEM
:
{
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_QEM
<
PFP
>
(
m_map
,
pos_v
))
;
m_approximators
.
push_back
(
new
Algo
::
Surface
::
Decimation
::
Approximator_QEM
<
PFP
>
(
m_map
,
pos_v
))
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
A_MidEdge
:
{
case
Algo
::
Surface
::
Decimation
::
A_MidEdge
:
{
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
pos_v
))
;
m_approximators
.
push_back
(
new
Algo
::
Surface
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
pos_v
))
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
A_hHalfCollapse
:
{
case
Algo
::
Surface
::
Decimation
::
A_hHalfCollapse
:
{
Algo
::
Decimation
::
Predictor_HalfCollapse
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_HalfCollapse
<
PFP
>
(
m_map
,
positionsTable
)
;
Algo
::
Surface
::
Decimation
::
Predictor_HalfCollapse
<
PFP
>*
pred
=
new
Algo
::
Surface
::
Decimation
::
Predictor_HalfCollapse
<
PFP
>
(
m_map
,
positionsTable
)
;
m_predictors
.
push_back
(
pred
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_HalfCollapse
<
PFP
>
(
m_map
,
pos_v
,
pred
))
;
m_approximators
.
push_back
(
new
Algo
::
Surface
::
Decimation
::
Approximator_HalfCollapse
<
PFP
>
(
m_map
,
pos_v
,
pred
))
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
A_CornerCutting
:
{
case
Algo
::
Surface
::
Decimation
::
A_CornerCutting
:
{
Algo
::
Decimation
::
Predictor_CornerCutting
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_CornerCutting
<
PFP
>
(
m_map
,
positionsTable
)
;
Algo
::
Surface
::
Decimation
::
Predictor_CornerCutting
<
PFP
>*
pred
=
new
Algo
::
Surface
::
Decimation
::
Predictor_CornerCutting
<
PFP
>
(
m_map
,
positionsTable
)
;
m_predictors
.
push_back
(
pred
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_CornerCutting
<
PFP
>
(
m_map
,
pos_v
,
pred
))
;
m_approximators
.
push_back
(
new
Algo
::
Surface
::
Decimation
::
Approximator_CornerCutting
<
PFP
>
(
m_map
,
pos_v
,
pred
))
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
A_TangentPredict1
:
{
case
Algo
::
Surface
::
Decimation
::
A_TangentPredict1
:
{
Algo
::
Decimation
::
Predictor_TangentPredict1
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_TangentPredict1
<
PFP
>
(
m_map
,
positionsTable
)
;
Algo
::
Surface
::
Decimation
::
Predictor_TangentPredict1
<
PFP
>*
pred
=
new
Algo
::
Surface
::
Decimation
::
Predictor_TangentPredict1
<
PFP
>
(
m_map
,
positionsTable
)
;
m_predictors
.
push_back
(
pred
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
pos_v
,
pred
))
;
m_approximators
.
push_back
(
new
Algo
::
Surface
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
pos_v
,
pred
))
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
A_TangentPredict2
:
{
case
Algo
::
Surface
::
Decimation
::
A_TangentPredict2
:
{
Algo
::
Decimation
::
Predictor_TangentPredict2
<
PFP
>*
pred
=
new
Algo
::
Decimation
::
Predictor_TangentPredict2
<
PFP
>
(
m_map
,
positionsTable
)
;
Algo
::
Surface
::
Decimation
::
Predictor_TangentPredict2
<
PFP
>*
pred
=
new
Algo
::
Surface
::
Decimation
::
Predictor_TangentPredict2
<
PFP
>
(
m_map
,
positionsTable
)
;
m_predictors
.
push_back
(
pred
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
pos_v
,
pred
))
;
m_approximators
.
push_back
(
new
Algo
::
Surface
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
pos_v
,
pred
))
;
break
;
}
break
;
}
}
}
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
...
@@ -79,23 +82,23 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
...
@@ -79,23 +82,23 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
CGoGNout
<<
" creating selector.."
<<
CGoGNflush
;
CGoGNout
<<
" creating selector.."
<<
CGoGNflush
;
switch
(
s
)
switch
(
s
)
{
{
case
Algo
::
Decimation
::
S_MapOrder
:
{
case
Algo
::
Surface
::
Decimation
::
S_MapOrder
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_MapOrder
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_MapOrder
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
S_Random
:
{
case
Algo
::
Surface
::
Decimation
::
S_Random
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Random
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_Random
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
S_EdgeLength
:
{
case
Algo
::
Surface
::
Decimation
::
S_EdgeLength
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Length
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_Length
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
S_QEM
:
{
case
Algo
::
Surface
::
Decimation
::
S_QEM
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_QEM
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_QEM
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
S_MinDetail
:
{
case
Algo
::
Surface
::
Decimation
::
S_MinDetail
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_MinDetail
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_MinDetail
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
S_Curvature
:
{
case
Algo
::
Surface
::
Decimation
::
S_Curvature
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Curvature
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
m_selector
=
new
Algo
::
Surface
::
Decimation
::
EdgeSelector_Curvature
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
break
;
}
break
;
}
}
}
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
...
@@ -103,17 +106,17 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
...
@@ -103,17 +106,17 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
m_initOk
=
true
;
m_initOk
=
true
;
CGoGNout
<<
" initializing approximators.."
<<
CGoGNflush
;
CGoGNout
<<
" initializing approximators.."
<<
CGoGNflush
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
for
(
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
{
{
if
(
!
(
*
it
)
->
init
())
if
(
!
(
*
it
)
->
init
())
m_initOk
=
false
;
m_initOk
=
false
;
if
((
*
it
)
->
getApproximatedAttributeName
()
==
"position"
)
if
((
*
it
)
->
getApproximatedAttributeName
()
==
"position"
)
m_positionApproximator
=
reinterpret_cast
<
Algo
::
Decimation
::
Approximator
<
PFP
,
VEC3
,
EDGE
>*>
(
*
it
)
;
m_positionApproximator
=
reinterpret_cast
<
Algo
::
Surface
::
Decimation
::
Approximator
<
PFP
,
VEC3
,
EDGE
>*>
(
*
it
)
;
}
}
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
" initializing predictors.."
<<
CGoGNflush
;
CGoGNout
<<
" initializing predictors.."
<<
CGoGNflush
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
it
=
m_predictors
.
begin
();
it
!=
m_predictors
.
end
();
++
it
)
for
(
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
it
=
m_predictors
.
begin
();
it
!=
m_predictors
.
end
();
++
it
)
if
(
!
(
*
it
)
->
init
())
if
(
!
(
*
it
)
->
init
())
m_initOk
=
false
;
m_initOk
=
false
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
...
@@ -135,9 +138,9 @@ ProgressiveMesh<PFP>::~ProgressiveMesh()
...
@@ -135,9 +138,9 @@ ProgressiveMesh<PFP>::~ProgressiveMesh()
delete
m_splits
[
i
]
;
delete
m_splits
[
i
]
;
if
(
m_selector
)
if
(
m_selector
)
delete
m_selector
;
delete
m_selector
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
for
(
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
delete
(
*
it
)
;
delete
(
*
it
)
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
it
=
m_predictors
.
begin
();
it
!=
m_predictors
.
end
();
++
it
)
for
(
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
it
=
m_predictors
.
begin
();
it
!=
m_predictors
.
end
();
++
it
)
delete
(
*
it
)
;
delete
(
*
it
)
;
if
(
quantizationInitialized
)
if
(
quantizationInitialized
)
delete
q
;
delete
q
;
...
@@ -164,7 +167,7 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices)
...
@@ -164,7 +167,7 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices)
VSplit
<
PFP
>*
vs
=
new
VSplit
<
PFP
>
(
m_map
,
d
,
dd2
,
d2
)
;
// create new VSplit node
VSplit
<
PFP
>*
vs
=
new
VSplit
<
PFP
>
(
m_map
,
d
,
dd2
,
d2
)
;
// create new VSplit node
m_splits
.
push_back
(
vs
)
;
// and store it
m_splits
.
push_back
(
vs
)
;
// and store it
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
for
(
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
{
{
(
*
it
)
->
approximate
(
d
)
;
// compute approximated attributes with its associated detail
(
*
it
)
->
approximate
(
d
)
;
// compute approximated attributes with its associated detail
(
*
it
)
->
saveApprox
(
d
)
;
(
*
it
)
->
saveApprox
(
d
)
;
...
@@ -181,7 +184,7 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices)
...
@@ -181,7 +184,7 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices)
vs
->
setApproxE1
(
newE1
)
;
vs
->
setApproxE1
(
newE1
)
;
vs
->
setApproxE2
(
newE2
)
;
vs
->
setApproxE2
(
newE2
)
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
for
(
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
(
*
it
)
->
affectApprox
(
d2
);
// affect data to the resulting vertex
(
*
it
)
->
affectApprox
(
d2
);
// affect data to the resulting vertex
m_selector
->
updateAfterCollapse
(
d2
,
dd2
)
;
// update selector
m_selector
->
updateAfterCollapse
(
d2
,
dd2
)
;
// update selector
...
@@ -270,7 +273,7 @@ void ProgressiveMesh<PFP>::refine()
...
@@ -270,7 +273,7 @@ void ProgressiveMesh<PFP>::refine()
if
(
!
m_predictors
.
empty
())
if
(
!
m_predictors
.
empty
())
{
{
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
pit
=
m_predictors
.
begin
();
for
(
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
pit
=
m_predictors
.
begin
();
pit
!=
m_predictors
.
end
();
pit
!=
m_predictors
.
end
();
++
pit
)
++
pit
)
{
{
...
@@ -281,7 +284,7 @@ void ProgressiveMesh<PFP>::refine()
...
@@ -281,7 +284,7 @@ void ProgressiveMesh<PFP>::refine()
typename
PFP
::
MATRIX33
invLocalFrame
;
typename
PFP
::
MATRIX33
invLocalFrame
;
if
(
m_localFrameDetailVectors
)
if
(
m_localFrameDetailVectors
)
{
{
typename
PFP
::
MATRIX33
localFrame
=
Algo
::
Geometry
::
vertexLocalFrame
<
PFP
>
(
m_map
,
dd2
,
positionsTable
)
;
typename
PFP
::
MATRIX33
localFrame
=
Algo
::
Surface
::
Geometry
::
vertexLocalFrame
<
PFP
>
(
m_map
,
dd2
,
positionsTable
)
;
localFrame
.
invert
(
invLocalFrame
)
;
localFrame
.
invert
(
invLocalFrame
)
;
}
}
...
@@ -296,8 +299,8 @@ void ProgressiveMesh<PFP>::refine()
...
@@ -296,8 +299,8 @@ void ProgressiveMesh<PFP>::refine()
if
(
!
m_predictors
.
empty
())
if
(
!
m_predictors
.
empty
())
{
{
typename
std
::
vector
<
Algo
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
pit
;
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
pit
;
typename
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
ait
;
typename
std
::
vector
<
Algo
::
Surface
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
ait
;
for
(
pit
=
m_predictors
.
begin
(),
ait
=
m_approximators
.
begin
();
for
(
pit
=
m_predictors
.
begin
(),
ait
=
m_approximators
.
begin
();
pit
!=
m_predictors
.
end
();
pit
!=
m_predictors
.
end
();
++
pit
,
++
ait
)
++
pit
,
++
ait
)
...
@@ -307,7 +310,7 @@ void ProgressiveMesh<PFP>::refine()
...
@@ -307,7 +310,7 @@ void ProgressiveMesh<PFP>::refine()
detailTransform
=
&
invLocalFrame
;
detailTransform
=
&
invLocalFrame
;
(
*
pit
)
->
affectPredict
(
d
)
;
(
*
pit
)
->
affectPredict
(
d
)
;
if
((
*
ait
)
->
getType
()
==
Algo
::
Decimation
::
A_hHalfCollapse
)
if
((
*
ait
)
->
getType
()
==
Algo
::
Surface
::
Decimation
::
A_hHalfCollapse
)
{
{
(
*
ait
)
->
addDetail
(
dd
,
m_detailAmount
,
true
,
detailTransform
)
;
(
*
ait
)
->
addDetail
(
dd
,
m_detailAmount
,
true
,
detailTransform
)
;
}
}
...
@@ -378,7 +381,7 @@ void ProgressiveMesh<PFP>::localizeDetailVectors()
...
@@ -378,7 +381,7 @@ void ProgressiveMesh<PFP>::localizeDetailVectors()
{
{
Dart
d
=
m_splits
[
m_cur
-
1
]
->
getEdge
()
;
Dart
d
=
m_splits
[
m_cur
-
1
]
->
getEdge
()
;
Dart
dd2
=
m_splits
[
m_cur
-
1
]
->
getRightEdge
()
;
Dart
dd2
=
m_splits
[
m_cur
-
1
]
->
getRightEdge
()
;
typename
PFP
::
MATRIX33
localFrame
=
Algo
::
Geometry
::
vertexLocalFrame
<
PFP
>
(
m_map
,
dd2
,
positionsTable
)
;
typename
PFP
::
MATRIX33
localFrame
=
Algo
::
Surface
::
Geometry
::
vertexLocalFrame
<
PFP
>
(
m_map
,
dd2
,
positionsTable
)
;
VEC3
det
=
m_positionApproximator
->
getDetail
(
d
)
;
VEC3
det
=
m_positionApproximator
->
getDetail
(
d
)
;
det
=
localFrame
*
det
;
det
=
localFrame
*
det
;
m_positionApproximator
->
setDetail
(
d
,
det
)
;
m_positionApproximator
->
setDetail
(
d
,
det
)
;
...
@@ -409,7 +412,7 @@ void ProgressiveMesh<PFP>::globalizeDetailVectors()
...
@@ -409,7 +412,7 @@ void ProgressiveMesh<PFP>::globalizeDetailVectors()
{
{
Dart
d
=
m_splits
[
m_cur
-
1
]
->
getEdge
()
;
Dart
d
=
m_splits
[
m_cur
-
1
]
->
getEdge
()
;
Dart
dd2
=
m_splits
[
m_cur
-
1
]
->
getRightEdge
()
;
Dart
dd2
=
m_splits
[
m_cur
-
1
]
->
getRightEdge
()
;
typename
PFP
::
MATRIX33
localFrame
=
Algo
::
Geometry
::
vertexLocalFrame
<
PFP
>
(
m_map
,
dd2
,
positionsTable
)
;
typename
PFP
::
MATRIX33
localFrame
=
Algo
::
Surface
::
Geometry
::
vertexLocalFrame
<
PFP
>
(
m_map
,
dd2
,
positionsTable
)
;
typename
PFP
::
MATRIX33
invLocalFrame
;
typename
PFP
::
MATRIX33
invLocalFrame
;
localFrame
.
invert
(
invLocalFrame
)
;
localFrame
.
invert
(
invLocalFrame
)
;
VEC3
det
=
m_positionApproximator
->
getDetail
(
d
)
;
VEC3
det
=
m_positionApproximator
->
getDetail
(
d
)
;
...
@@ -573,7 +576,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion()
...
@@ -573,7 +576,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion()
*/
*/
}
//namespace PMesh
}
//namespace PMesh
}
// Surface
}
//namespace Algo
}
//namespace Algo
}
}
//namespace CGoGN
}
//namespace CGoGN
include/Algo/ProgressiveMesh/vsplit.h
View file @
ce89d70a
...
@@ -31,6 +31,9 @@ namespace CGoGN
...
@@ -31,6 +31,9 @@ namespace CGoGN
namespace
Algo
namespace
Algo
{
{
namespace
Surface
{
namespace
PMesh
namespace
PMesh
{
{
...
@@ -98,9 +101,8 @@ public:
...
@@ -98,9 +101,8 @@ public:
}
;
}
;
}
//namespace PMesh
}
//namespace PMesh
}
// Surface
}
//namespace Algo
}
//namespace Algo
}
//namespace CGoGN
}
//namespace CGoGN
#endif
#endif
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