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
3029395b
Commit
3029395b
authored
Sep 14, 2012
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of cgogn:~cgogn/CGoGN
parents
52d99577
69653d4f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
212 additions
and
135 deletions
+212
-135
include/Algo/Geometry/voronoiDiagrams.h
include/Algo/Geometry/voronoiDiagrams.h
+1
-1
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+6
-12
include/Algo/Modelisation/tetrahedralization.hpp
include/Algo/Modelisation/tetrahedralization.hpp
+81
-77
include/Algo/Multiresolution/map2MR/map2MR_PM.h
include/Algo/Multiresolution/map2MR/map2MR_PM.h
+4
-8
include/Algo/Multiresolution/map2MR/map2MR_PM.hpp
include/Algo/Multiresolution/map2MR/map2MR_PM.hpp
+36
-26
include/Algo/Multiresolution/map3MR/map3MR_PrimalRegular.h
include/Algo/Multiresolution/map3MR/map3MR_PrimalRegular.h
+6
-0
include/Algo/Multiresolution/map3MR/map3MR_PrimalRegular.hpp
include/Algo/Multiresolution/map3MR/map3MR_PrimalRegular.hpp
+63
-0
include/Algo/Render/GL2/topo3Render.h
include/Algo/Render/GL2/topo3Render.h
+0
-2
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
+15
-9
No files found.
include/Algo/Geometry/voronoiDiagrams.h
View file @
3029395b
...
...
@@ -38,7 +38,7 @@ protected :
VertexAttribute
<
VertexInfo
>
vertexInfo
;
std
::
multimap
<
float
,
Dart
>
front
;
CellMarker
Store
<
VERTEX
>
vmReached
;
CellMarker
<
VERTEX
>
vmReached
;
public
:
VoronoiDiagram
(
typename
PFP
::
MAP
&
m
,
const
EdgeAttribute
<
REAL
>&
c
,
VertexAttribute
<
unsigned
int
>&
r
);
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
3029395b
...
...
@@ -81,23 +81,17 @@ void subdivideFace(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
unsigned
int
cur
=
map
.
getCurrentLevel
()
;
map
.
setCurrentLevel
(
fLevel
)
;
// go to the level of the face to subdivide its edges
//
unsigned int vLevel = map.volumeLevel(old);
//
//one level of subdivision in the neighbordhood
unsigned
int
vLevel
=
map
.
volumeLevel
(
old
);
//one level of subdivision in the neighbordhood
// Traversor3VW<typename PFP::MAP> trav3EW(map, old);
// for(Dart dit = trav3EW.begin() ; dit != trav3EW.end() ; dit = trav3EW.next())
// {
// Dart oldit = map.volumeOldestDart(dit);
// if(((vLevel+1) - map.volumeLevel(oldit)) > 1)
// Algo::IHM::subdivideVolumeClassic<PFP>(map, oldit, position);
//
//// Dart oldNeighbor = map.volumeOldestDart(map.phi3(old));
//// unsigned int vLevel = map.volumeLevel(oldNeighbor);
////
//// std::cout << "vLevel courant = " << map.volumeLevel(old) << std::endl;
//// std::cout << "vLevel voisin = " << vLevel << std::endl;
////
//// if((map.volumeLevel(old)+1) - (vLevel) > 1)
//// Algo::IHM::subdivideVolumeClassic<PFP>(map, oldNeighbor, position);
// //std::cout << "vLevel courant = " << map.volumeLevel(oldit) << std::endl;
//
// if(((vLevel+1) - map.volumeLevel(oldit)) > 1)
// Algo::IHM::subdivideVolumeClassic<PFP>(map, oldit, position);
// }
unsigned
int
degree
=
0
;
...
...
include/Algo/Modelisation/tetrahedralization.hpp
View file @
3029395b
...
...
@@ -569,88 +569,92 @@ void swap5To4(typename PFP::MAP& map, Dart d, VertexAttribute<typename PFP::VEC3
* Flip Functions *
************************************************************************************************/
template
<
typename
PFP
>
void
flip1To4
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
)
{
// typedef typename PFP::TVEC3 T
VEC3;
// typedef typename PFP::VEC3 VEC3;
//
//
// //parcourir le tetra est sauvegarder un brin de chaque face + calcul du centroid
// VEC3 volCenter
;
// unsigned count = 0 ;
//
// DartMarkerStore mf(map); // Lock a face marker to save one dart per face
// DartMarkerStore mv(map); // Lock a vertex marker to compute volume center
//
// std::vector<Dart> visitedFaces
;
// visitedFaces.reserve(4
);
// visitedFaces.push_back(d);
//
// mf.markOrbit<FACE>(d) ;
//
// //TODO diminuer complexite avec boucle specifique aux tetras
// for(unsigned int i = 0; i < visitedFaces.size(); ++i)
// {
// Dart e = visitedFaces[i] ;
// do
// {
// //compute volume centroid
// if(!mv.isMarked(e))
// {
// volCenter += position[e]
;
// ++count
;
// mv.markOrbit<VERTEX>(e);
// }
//
// // add all face neighbours to the table
// Dart ee = map.phi2(e) ;
// if(!mf.isMarked(ee)) // not already marked
// {
// visitedFaces.push_back
(ee) ;
// mf.markOrbit<FACE>(ee) ;
// }
//
// e = map.phi1(e
) ;
// } while(e != visitedFaces[i]) ;
// }
//
// volCenter /= typename PFP::REAL(count) ;
//
// //store the new faces to 3-sew
// std::vector<std::pair<Dart,Dart> > nFaces
;
// nFaces.reserve(6);
//
// //triangule chaque face avec plongement au centroid
// for (std::vector<Dart>::iterator face = visitedFaces.begin(); face != visitedFaces.end(); ++face)
// {
// // on decoud et on ferme le trou
// Dart temp = *face;
// do
// {
// nFaces.push_back(std::pair<Dart,Dart>(temp, map.phi2(temp))
);
// map.unsewFaces
(temp);
// temp = map.phi1(temp);
// }
// while(temp != *face);
//
// map.closeHole(*face);
//
// Dart fi = map.phi2(*face);
//
// Dart cd = Algo::Modelisation::trianguleFace<PFP>(map, fi)
;
// position[cd] = volCenter;
// }
//
// //coudre les nouveaux brins entre eux par phi3
// for (std::vector<std::pair<Dart,Dart> >::iterator face =nFaces.begin(); face != nFaces.end(); ++face)
// {
//
// if(map.phi3(map.phi2((*face).first)) == map.phi2((*face).first))
// map.sewVolumes(map.phi2((*face).first), map.phi2((*face).second));
// }
typedef
typename
PFP
::
VEC3
VEC3
;
//parcourir le tetra est sauvegarder un brin de chaque face + calcul du centroid
VEC3
volCenter
;
unsigned
count
=
0
;
DartMarkerStore
mf
(
map
);
// Lock a face marker to save one dart per face
DartMarkerStore
mv
(
map
);
// Lock a vertex marker to compute volume center
std
::
vector
<
Dart
>
visitedFaces
;
visitedFaces
.
reserve
(
4
)
;
visitedFaces
.
push_back
(
d
);
mf
.
markOrbit
<
FACE
>
(
d
)
;
//TODO diminuer complexite avec boucle specifique aux tetras
for
(
unsigned
int
i
=
0
;
i
<
visitedFaces
.
size
();
++
i
)
{
Dart
e
=
visitedFaces
[
i
]
;
do
{
//compute volume centroid
if
(
!
mv
.
isMarked
(
e
))
{
volCenter
+=
position
[
e
];
++
count
;
mv
.
markOrbit
<
VERTEX
>
(
e
)
;
}
// add all face neighbours to the table
Dart
ee
=
map
.
phi2
(
e
)
;
if
(
!
mf
.
isMarked
(
ee
))
// not already marked
{
visitedFaces
.
push_back
(
ee
)
;
mf
.
markOrbit
<
FACE
>
(
ee
)
;
}
e
=
map
.
phi1
(
e
)
;
}
while
(
e
!=
visitedFaces
[
i
]
)
;
}
volCenter
/=
typename
PFP
::
REAL
(
count
)
;
//store the new faces to 3-sew
std
::
vector
<
std
::
pair
<
Dart
,
Dart
>
>
nFaces
;
nFaces
.
reserve
(
6
)
;
//triangule chaque face avec plongement au centroid
for
(
std
::
vector
<
Dart
>::
iterator
face
=
visitedFaces
.
begin
();
face
!=
visitedFaces
.
end
();
++
face
)
{
// on decoud et on ferme le trou
Dart
temp
=
*
face
;
do
{
nFaces
.
push_back
(
std
::
pair
<
Dart
,
Dart
>
(
temp
,
map
.
phi2
(
temp
)));
map
.
unsewFaces
(
temp
);
temp
=
map
.
phi1
(
temp
);
}
while
(
temp
!=
*
face
);
map
.
PFP
::
MAP
::
ParentMap
::
closeHole
(
*
face
);
Dart
fi
=
map
.
phi2
(
*
face
);
Dart
cd
=
Algo
::
Modelisation
::
trianguleFace
<
PFP
>
(
map
,
fi
);
position
[
cd
]
=
volCenter
;
}
//coudre les nouveaux brins entre eux par phi3
for
(
std
::
vector
<
std
::
pair
<
Dart
,
Dart
>
>::
iterator
face
=
nFaces
.
begin
();
face
!=
nFaces
.
end
();
++
face
)
{
if
(
map
.
phi3
(
map
.
phi2
((
*
face
).
first
))
==
map
.
phi2
((
*
face
).
first
))
map
.
sewVolumes
(
map
.
phi2
((
*
face
).
first
),
map
.
phi2
((
*
face
).
second
));
}
}
/************************************************************************************************
* Bisection Functions *
************************************************************************************************/
...
...
include/Algo/Multiresolution/map2MR/map2MR_PM.h
View file @
3029395b
...
...
@@ -57,14 +57,9 @@ public:
private:
MAP
&
m_map
;
VertexAttribute
<
VEC3
>&
m_position
;
bool
shareVertexEmbeddings
;
//SelectorUnmarked dartSelect ;
bool
m_initOk
;
DartMarker
&
inactiveMarker
;
Algo
::
Decimation
::
EdgeSelector
<
PFP
>*
m_selector
;
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>
m_approximators
;
std
::
vector
<
Algo
::
Decimation
::
PredictorGen
<
PFP
>*>
m_predictors
;
...
...
@@ -72,13 +67,14 @@ private:
Algo
::
Decimation
::
Approximator
<
PFP
,
VEC3
>*
m_positionApproximator
;
public:
Map2MR_PM
(
MAP
&
map
,
VertexAttribute
<
VEC3
>&
position
,
DartMarker
&
inactive
,
Algo
::
Decimation
::
SelectorType
s
,
Algo
::
Decimation
::
ApproximatorType
a
)
;
Map2MR_PM
(
MAP
&
map
,
VertexAttribute
<
VEC3
>&
position
);
~
Map2MR_PM
();
//create a progressive mesh (a coarser level)
void
createPM
(
unsigned
int
percentWantedVertices
);
void
createPM
(
Algo
::
Decimation
::
SelectorType
s
,
Algo
::
Decimation
::
ApproximatorType
a
,
const
FunctorSelect
&
select
=
allDarts
)
;
void
addNewLevel
(
unsigned
int
percentWantedVertices
);
//coarsen the mesh -> analysis
void
coarsen
()
;
...
...
include/Algo/Multiresolution/map2MR/map2MR_PM.hpp
View file @
3029395b
...
...
@@ -33,10 +33,28 @@ namespace Multiresolution
{
template
<
typename
PFP
>
Map2MR_PM
<
PFP
>::
Map2MR_PM
(
MAP
&
map
,
VertexAttribute
<
VEC3
>&
position
,
DartMarker
&
inactive
,
Algo
::
Decimation
::
SelectorType
s
,
Algo
::
Decimation
::
ApproximatorType
a
)
:
m_map
(
map
),
m_position
(
position
),
inactiveMarker
(
inactive
)
Map2MR_PM
<
PFP
>::
Map2MR_PM
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
)
:
m_map
(
map
),
m_position
(
position
)
{
//TODO
//map.enableMR();
}
template
<
typename
PFP
>
Map2MR_PM
<
PFP
>::~
Map2MR_PM
()
{
if
(
m_selector
)
delete
m_selector
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
delete
(
*
it
)
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
it
=
m_predictors
.
begin
();
it
!=
m_predictors
.
end
();
++
it
)
delete
(
*
it
)
;
//TODO
//map.disableMR()
}
template
<
typename
PFP
>
void
Map2MR_PM
<
PFP
>::
createPM
(
Algo
::
Decimation
::
SelectorType
s
,
Algo
::
Decimation
::
ApproximatorType
a
,
const
FunctorSelect
&
select
=
allDarts
)
{
CGoGNout
<<
" creating approximator and predictor.."
<<
CGoGNflush
;
...
...
@@ -75,22 +93,22 @@ Map2MR_PM<PFP>::Map2MR_PM(MAP& map, VertexAttribute<VEC3>& position, DartMarker&
switch
(
s
)
{
case
Algo
::
Decimation
::
S_MapOrder
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_MapOrder
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
allDarts
)
;
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_MapOrder
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
select
)
;
break
;
}
case
Algo
::
Decimation
::
S_Random
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Random
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
allDarts
)
;
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Random
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
select
)
;
break
;
}
case
Algo
::
Decimation
::
S_EdgeLength
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Length
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
allDarts
)
;
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Length
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
select
)
;
break
;
}
case
Algo
::
Decimation
::
S_QEM
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_QEM
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
allDarts
)
;
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_QEM
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
select
)
;
break
;
}
case
Algo
::
Decimation
::
S_MinDetail
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_MinDetail
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
allDarts
)
;
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_MinDetail
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
select
)
;
break
;
}
case
Algo
::
Decimation
::
S_Curvature
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Curvature
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
allDarts
)
;
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Curvature
<
PFP
>
(
m_map
,
m_position
,
m_approximators
,
select
)
;
break
;
}
}
CGoGNout
<<
"..done"
<<
CGoGNendl
;
...
...
@@ -112,32 +130,22 @@ Map2MR_PM<PFP>::Map2MR_PM(MAP& map, VertexAttribute<VEC3>& position, DartMarker&
if
(
!
(
*
it
)
->
init
())
m_initOk
=
false
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
}
template
<
typename
PFP
>
Map2MR_PM
<
PFP
>::~
Map2MR_PM
()
{
if
(
m_selector
)
delete
m_selector
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
delete
(
*
it
)
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
it
=
m_predictors
.
begin
();
it
!=
m_predictors
.
end
();
++
it
)
delete
(
*
it
)
;
CGoGNout
<<
" initializing selector.."
<<
CGoGNflush
;
m_initOk
=
m_selector
->
init
()
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
}
template
<
typename
PFP
>
void
Map2MR_PM
<
PFP
>::
createPM
(
unsigned
int
percentWantedVertices
)
void
Map2MR_PM
<
PFP
>::
addNewLevel
(
unsigned
int
percentWantedVertices
)
{
// level handling
m_map
.
pushLevel
()
;
m_map
.
addLevel
();
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
())
;
// PM creation
CGoGNout
<<
" initializing selector.."
<<
CGoGNflush
;
m_initOk
=
m_selector
->
init
()
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
unsigned
int
nbVertices
=
m_map
.
template
getNbOrbits
<
VERTEX
>()
;
unsigned
int
nbWantedVertices
=
nbVertices
*
percentWantedVertices
/
100
;
CGoGNout
<<
" creating PM ("
<<
nbVertices
<<
" vertices).."
<<
/* flush */
CGoGNendl
;
...
...
@@ -153,6 +161,8 @@ void Map2MR_PM<PFP>::createPM(unsigned int percentWantedVertices)
Dart
d2
=
m_map
.
phi2
(
m_map
.
phi_1
(
d
))
;
Dart
dd2
=
m_map
.
phi2
(
m_map
.
phi_1
(
m_map
.
phi2
(
d
)))
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
{
(
*
it
)
->
approximate
(
d
)
;
// compute approximated attributes with its associated detail
...
...
include/Algo/Multiresolution/map3MR/map3MR_PrimalRegular.h
View file @
3029395b
...
...
@@ -77,6 +77,12 @@ public:
*
*************************************************************************/
//@{
//!
/*
*
*/
void
addNewLevelSqrt3
(
bool
embedNewVertices
);
//!
/*
*/
...
...
include/Algo/Multiresolution/map3MR/map3MR_PrimalRegular.hpp
View file @
3029395b
...
...
@@ -103,6 +103,69 @@ void Map3MR_PrimalRegular<PFP>::splitSurfaceInVolume(std::vector<Dart>& vd, bool
/************************************************************************
* Level creation *
************************************************************************/
template
<
typename
PFP
>
void
Map3MR_PrimalRegular
<
PFP
>::
addNewLevelSqrt3
(
bool
embedNewVertices
)
{
m_map
.
pushLevel
();
m_map
.
addLevel
();
//m_map.setCurrentLevel(m_map.getMaxLevel());
unsigned
int
cur
=
m_map
.
getCurrentLevel
();
//
TraversorW
<
typename
PFP
::
MAP
>
travW
(
m_map
);
for
(
Dart
dit
=
travW
.
begin
()
;
dit
!=
travW
.
end
()
;
dit
=
travW
.
next
())
{
m_map
.
setCurrentLevel
(
cur
+
1
);
//store the new faces to 3-sew
std
::
vector
<
std
::
pair
<
Dart
,
Dart
>
>
nFaces
;
nFaces
.
reserve
(
6
);
Traversor3WF
<
typename
PFP
::
MAP
>
travWF
(
m_map
,
dit
);
for
(
Dart
ditWF
=
travWF
.
begin
()
;
ditWF
!=
travWF
.
end
()
;
ditWF
=
travWF
.
next
())
{
// Dart temp = ditWF;
// do
// {
// nFaces.push_back(std::pair<Dart,Dart>(temp, m_map.phi2(temp)));
// m_map.unsewFaces(temp);
// temp = m_map.phi1(temp);
// }
// while(temp != ditWF);
//
// m_map.PFP::MAP::ParentMap::closeHole(ditWF, false);
//Dart fi = map.phi2(*face);
// std::vector<Dart> split;
// split.push_back(ditWF);
// split.push_back(m_map.phi1(ditWF));
// split.push_back(m_map.phi_1(ditWF));
//
// splitSurfaceInVolume(split,true,false);
}
//Dart fi = map.phi2(*face);
// //coudre les nouveaux brins entre eux par phi3
// for (std::vector<std::pair<Dart,Dart> >::iterator face =nFaces.begin(); face != nFaces.end(); ++face)
// {
//
// if(map.phi3(map.phi2((*face).first)) == map.phi2((*face).first))
// map.sewVolumes(map.phi2((*face).first), map.phi2((*face).second));
// }
//
m_map
.
setCurrentLevel
(
cur
);
}
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
());
}
template
<
typename
PFP
>
void
Map3MR_PrimalRegular
<
PFP
>::
addNewLevelTetraOcta
(
bool
embedNewVertices
)
{
...
...
include/Algo/Render/GL2/topo3Render.h
View file @
3029395b
...
...
@@ -212,7 +212,6 @@ public:
/**
* change all darts drawing color
* @param d the dart
* @param r red !
* @param g green !
* @param b blue !
...
...
@@ -221,7 +220,6 @@ public:
/**
* change dart initial color (used when calling updateData)
* @param d the dart
* @param r red !
* @param g green !
* @param b blue !
...
...
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
View file @
3029395b
...
...
@@ -728,10 +728,13 @@ bool ImplicitHierarchicalMap3::neighborhoodLevelDiffersMoreThanOne(Dart d)
unsigned
int
vLevel
=
volumeLevel
(
d
);
bool
isMoreThanOne
=
false
;
// std::cout << "niveau du courant : " << vLevel << std::endl;
Traversor3WWaV
<
ImplicitHierarchicalMap3
>
trav3WWaV
(
*
this
,
d
);
for
(
Dart
dit
=
trav3WWaV
.
begin
()
;
!
isMoreThanOne
&&
dit
!=
trav3WWaV
.
end
()
;
dit
=
trav3WWaV
.
next
())
{
//Dart oldit = volumeOldestDart(dit);
// std::cout << "niveau du voisin : " << volumeLevel(dit) << std::endl;
// std::cout << "difference de niveau avec voisin : " << abs((volumeLevel(dit) - vLevel)) << std::endl;
if
(
abs
((
volumeLevel
(
dit
)
-
vLevel
))
>
1
)
isMoreThanOne
=
true
;
}
...
...
@@ -751,18 +754,21 @@ bool ImplicitHierarchicalMap3::neighborhoodLevelDiffersMoreThanOne(Dart d)
bool
ImplicitHierarchicalMap3
::
coarsenNeighborhoodLevelDiffersMoreThanOne
(
Dart
d
)
{
assert
(
m_dartLevel
[
d
]
<=
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
//
assert(m_curLevel > 0 || !"Coarsen a volume at level 0");
//
assert(m_curLevel > 0 || !"Coarsen a volume at level 0");
Dart
old
=
volumeOldestDart
(
d
)
;
unsigned
int
vLevel
=
volumeLevel
(
d
)
-
1
;
bool
isMoreThanOne
=
false
;
// if(m_curLevel > 0)
// --m_curLevel;
isMoreThanOne
=
neighborhoodLevelDiffersMoreThanOne
(
old
);
// if(m_curLevel > 0)
// ++m_curLevel;
// std::cout << "niveau du courant : " << vLevel << std::endl;
Traversor3WWaV
<
ImplicitHierarchicalMap3
>
trav3WWaV
(
*
this
,
d
);
for
(
Dart
dit
=
trav3WWaV
.
begin
()
;
!
isMoreThanOne
&&
dit
!=
trav3WWaV
.
end
()
;
dit
=
trav3WWaV
.
next
())
{
//Dart oldit = volumeOldestDart(dit);
// std::cout << "niveau du voisin : " << volumeLevel(dit) << std::endl;
// std::cout << "difference de niveau avec voisin : " << abs((volumeLevel(dit) - vLevel)) << std::endl;
if
(
abs
((
volumeLevel
(
dit
)
-
vLevel
))
>
1
)
isMoreThanOne
=
true
;
}
return
isMoreThanOne
;
...
...
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