Commit e8dbdda7 authored by Thomas's avatar Thomas
Browse files

retour du brin central pour subdivideVolume

parent 3344bd1e
...@@ -48,7 +48,7 @@ template <typename PFP> ...@@ -48,7 +48,7 @@ template <typename PFP>
void subdivideFace(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position, SubdivideType sType = S_QUAD); void subdivideFace(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position, SubdivideType sType = S_QUAD);
template <typename PFP> template <typename PFP>
void subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position); Dart subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position);
template <typename PFP> template <typename PFP>
......
...@@ -168,11 +168,13 @@ void subdivideFace(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position ...@@ -168,11 +168,13 @@ void subdivideFace(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position
} }
template <typename PFP> template <typename PFP>
void subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position) Dart subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position)
{ {
assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ; assert(map.getDartLevel(d) <= map.getCurrentLevel() || !"Access to a dart introduced after current level") ;
assert(!map.volumeIsSubdivided(d) || !"Trying to subdivide an already subdivided volume") ; assert(!map.volumeIsSubdivided(d) || !"Trying to subdivide an already subdivided volume") ;
std::cout << "SUUUUUUB marine" << std::endl;
unsigned int vLevel = map.volumeLevel(d) ; unsigned int vLevel = map.volumeLevel(d) ;
Dart old = map.volumeOldestDart(d) ; Dart old = map.volumeOldestDart(d) ;
...@@ -362,6 +364,8 @@ void subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& positi ...@@ -362,6 +364,8 @@ void subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& positi
} }
map.setCurrentLevel(cur) ; map.setCurrentLevel(cur) ;
return subdividedfaces.begin()->first;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment