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
Thomas Pitiot
CGoGN
Commits
22a1e9b7
Commit
22a1e9b7
authored
Sep 09, 2011
by
untereiner
Browse files
Ajout d'un algo de subdiv volumique generalise + neighborhoodLevelDiffersByOne
parent
38e72f5d
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
include/Algo/ImplicitHierarchicalMesh/ihm3.h
View file @
22a1e9b7
...
...
@@ -264,6 +264,10 @@ public:
*/
bool
volumeIsSubdividedOnce
(
Dart
d
);
/**
*
*/
bool
neighborhoodLevelDiffersByOne
(
Dart
d
);
}
;
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.h
View file @
22a1e9b7
...
...
@@ -53,6 +53,9 @@ Dart subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& positi
template
<
typename
PFP
>
Dart
subdivideVolumeGen
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
);
template
<
typename
PFP
>
Dart
subdivideVolumeOld
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
typename
PFP
::
TVEC3
&
position
);
//template <typename PFP>
//void subdivideLoop(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position);
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
22a1e9b7
This diff is collapsed.
Click to expand it.
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
View file @
22a1e9b7
...
...
@@ -515,6 +515,51 @@ bool ImplicitHierarchicalMap3:: volumeIsSubdividedOnce(Dart d)
return
true
;
}
bool
ImplicitHierarchicalMap3
::
neighborhoodLevelDiffersByOne
(
Dart
d
)
{
assert
(
m_dartLevel
[
d
]
<=
m_curLevel
||
!
"Access to a dart introduced after current level"
)
;
bool
found
=
false
;
unsigned
int
vLevel
=
volumeLevel
(
d
)
+
1
;
Dart
old
=
volumeOldestDart
(
d
);
DartMarkerStore
mf
(
*
this
);
// Lock a face marker to save one dart per face
//Store faces that are traversed and start with the face of d
std
::
vector
<
Dart
>
visitedFaces
;
visitedFaces
.
reserve
(
20
);
visitedFaces
.
push_back
(
old
);
mf
.
markOrbit
(
FACE
,
old
)
;
for
(
std
::
vector
<
Dart
>::
iterator
face
=
visitedFaces
.
begin
();
!
found
&&
face
!=
visitedFaces
.
end
();
++
face
)
{
Dart
e
=
*
face
;
do
{
// add all face neighbours to the table
if
(
phi3
(
e
)
!=
e
&&
(
abs
(
volumeLevel
(
phi3
(
e
))
-
vLevel
)
>
1
))
{
found
=
true
;
}
Dart
ee
=
phi2
(
e
)
;
if
(
!
mf
.
isMarked
(
ee
))
// not already marked
{
visitedFaces
.
push_back
(
ee
)
;
mf
.
markOrbit
(
FACE
,
ee
)
;
}
e
=
phi1
(
e
)
;
}
while
(
e
!=
*
face
)
;
}
return
found
;
}
}
//namespace IHM
}
//namespace Algo
...
...
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