Coupure prévue mardi 3 Août au matin pour maintenance du serveur. Nous faisons au mieux pour que celle-ci soit la plus brève possible.

Commit cc7691b9 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

on avance sur le calcul du maillage dual

parent c59d85ad
...@@ -437,32 +437,24 @@ void LoopSubdivision(typename PFP::MAP& map, typename PFP::TVEC3& position, cons ...@@ -437,32 +437,24 @@ void LoopSubdivision(typename PFP::MAP& map, typename PFP::TVEC3& position, cons
template <typename PFP> template <typename PFP>
void computeDual(typename PFP::MAP& map, typename PFP::TVEC3& position, const FunctorSelect& selected) void computeDual(typename PFP::MAP& map, typename PFP::TVEC3& position, const FunctorSelect& selected)
{ {
// typedef typename PFP::MAP MAP ; typedef typename PFP::MAP MAP ;
// typedef typename PFP::VEC3 VEC3 ; typedef typename PFP::VEC3 VEC3 ;
// typedef typename PFP::REAL REAL ; typedef typename PFP::REAL REAL ;
//
// AutoAttributeHandler<VEC3> faceCentroid(map, FACE_ORBIT, "faceCentroid") ; AttributeHandler<Dart> phi1 = map.template getAttribute<Dart>(DART_ORBIT, "phi1") ;
// Algo::Geometry::computeCentroidFaces<PFP>(map, position, faceCentroid, selected) ; AttributeHandler<Dart> phi_1 = map.template getAttribute<Dart>(DART_ORBIT, "phi_1") ;
// AttributeHandler<Dart> new_phi1 = map.template addAttribute<Dart>(DART_ORBIT, "new_phi1") ;
// for(Dart d = map.begin(); d != map.end(); map.next(d))
// { for(Dart d = map.begin(); d != map.end(); map.next(d))
// if(m.isMarked(d)) {
// { Dart dd = map.alpha1(d) ;
// unsigned int em = map.newCell(VERTEX_ORBIT) ; new_phi1[d] = dd ;
// Dart dd = d ; phi_1[dd] = d ;
// do }
// {
// map.setDartEmbedding(map.phi2(dd), VERTEX_ORBIT, em) ; map.template swapAttributes<Dart>(phi1, new_phi1) ;
// m.unmark(dd) ;
// dd = map.phi1(dd) ; map.template removeAttribute<Dart>(new_phi1) ;
// }
// while (dd != d) ;
// attributs[map.phi2(d)] = *itEmb ;
// ++itEmb ;
// }
// }
//
// map.computeDual() ;
} }
template <typename PFP> template <typename PFP>
......
...@@ -56,8 +56,8 @@ template <typename T> ...@@ -56,8 +56,8 @@ template <typename T>
inline bool AttribMap::swapAttributes(AttributeHandler<T>& attr1, AttributeHandler<T>& attr2) inline bool AttribMap::swapAttributes(AttributeHandler<T>& attr1, AttributeHandler<T>& attr2)
{ {
assert((attr1.isValid() && attr2.isValid()) || !"Invalid attribute handler") ; assert((attr1.isValid() && attr2.isValid()) || !"Invalid attribute handler") ;
assert(AttributeContainer::orbitAttr(attr1.id()) == AttributeContainer::orbitAttr(attr2.id()) || !"Cannot swap attributes of different orbits") ;
unsigned int orbit = AttributeContainer::orbitAttr(attr1.id()) ; unsigned int orbit = AttributeContainer::orbitAttr(attr1.id()) ;
assert(orbit == AttributeContainer::orbitAttr(attr2.id()) || !"Cannot swap attributes of different orbits") ;
unsigned int index1 = AttributeContainer::indexAttr(attr1.id()) ; unsigned int index1 = AttributeContainer::indexAttr(attr1.id()) ;
unsigned int index2 = AttributeContainer::indexAttr(attr2.id()) ; unsigned int index2 = AttributeContainer::indexAttr(attr2.id()) ;
if(index1 != index2) if(index1 != index2)
......
...@@ -393,27 +393,6 @@ void Map2::reverseOrientation() ...@@ -393,27 +393,6 @@ void Map2::reverseOrientation()
} }
} }
//void Map2::computeDual()
//{
// AttributeContainer& cont = m_attribs[DART_ORBIT] ;
//
// unsigned int phi1_idx = cont.getAttribute("phi1") ;
// unsigned int new_phi1_idx = cont.addAttribute<Dart>("new_phi1") ;
//
// AttributeMultiVector<Dart>& new_phi1 = cont.getDataVector<Dart>(new_phi1_idx) ;
//
// for (Dart d = begin() ; d != end() ; next(d))
// {
// Dart dd = alpha1(d) ;
// new_phi1[d.index] = dd ;
// (*m_phi_1)[dd.index] = d ;
// }
//
// cont.swapAttributes(phi1_idx, new_phi1_idx) ;
//
// cont.removeAttribute(new_phi1_idx) ;
//}
/*! @name Topological Queries /*! @name Topological Queries
* Return or set various topological information * Return or set various topological information
*************************************************************************/ *************************************************************************/
......
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