diff --git a/include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp b/include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp index 812b175b9fde124780492301ad0df1ffff54cf16..d405932a39bb25a9303fde2297c65c833c23c0ca 100644 --- a/include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp +++ b/include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp @@ -215,9 +215,9 @@ Dart subdivideVolumeClassic(typename PFP::MAP& map, Dart d, VertexAttribute traF(map, old); - for(Dart dit = traF.begin(); dit != traF.end(); dit = traF.next()) - { + Traversor3WF traF(map, old); + for(Dart dit = traF.begin(); dit != traF.end(); dit = traF.next()) + { Dart nv = map.phi3(dit); if(!map.isBoundaryMarked(3, nv)) if(map.volumeLevel(nv) == vLevel - 1) diff --git a/include/Algo/MovingObjects/particle_cell_3D.h b/include/Algo/MovingObjects/particle_cell_3D.h index 479dd05890c6de6072ae92425fe8fa460a502064..03327a4b361e97f16e1cde204939906bff5af012 100644 --- a/include/Algo/MovingObjects/particle_cell_3D.h +++ b/include/Algo/MovingObjects/particle_cell_3D.h @@ -107,7 +107,7 @@ public : void volumeSpecialCase(const VEC3& current); - + void reset_positionFace(); void move(const VEC3& newCurrent) { diff --git a/include/Algo/MovingObjects/particle_cell_3D.hpp b/include/Algo/MovingObjects/particle_cell_3D.hpp index 01f60a7dc85fe925d5c1814fe88f4d53739946e9..a3b278abd15b8461287e254e20c099420b05b5a7 100644 --- a/include/Algo/MovingObjects/particle_cell_3D.hpp +++ b/include/Algo/MovingObjects/particle_cell_3D.hpp @@ -39,6 +39,7 @@ namespace MovingObjects #define DELTA 0.00001 //static const float DELTA=0.00001; + template void ParticleCell3D::display() { @@ -65,6 +66,12 @@ typename PFP::VEC3 ParticleCell3D::pointInFace(Dart d) // return (p1+p3)*0.5f; } +template +void ParticleCell3D:: reset_positionFace() +{ + this->m_positionFace=pointInFace(this->d); +} + template Geom::Orientation3D ParticleCell3D::isLeftENextVertex(VEC3 c, Dart d, VEC3 base) { @@ -683,7 +690,7 @@ void ParticleCell3D::volumeState(const VEC3& current) #endif CellMarkerStore mark(m); - bool above; + bool above; Geom::Orientation3D testRight=Geom::OVER; @@ -693,7 +700,9 @@ void ParticleCell3D::volumeState(const VEC3& current) Dart dd=d; bool particularcase=false; Geom::Orientation3D testLeft = isLeftL1DVol(current,d,this->m_positionFace,this->m_position); - +#ifdef DEBUG +std::cout << "isLEft1DVOl (current,d,m_positionFace,m_position) " << current<< " | " <m_positionFace<<" | " <m_position<::volumeState(const VEC3& current) this->m_position = current; return; } - +#ifdef DEBUG +std::cout << "volumeState va dans special case cas 1 " << d << std::endl; +#endif volumeSpecialCase(current); return; } @@ -750,6 +761,9 @@ void ParticleCell3D::volumeState(const VEC3& current) mark.mark(d); if(d==dd) { +#ifdef DEBUG +std::cout << "volumeState va dans special case cas 2 " << d << std::endl; +#endif volumeSpecialCase(current); return; } diff --git a/include/Algo/MovingObjects/particle_cell_3D_memo.hpp b/include/Algo/MovingObjects/particle_cell_3D_memo.hpp index 23b26d82a2eae9c2fb2dff039f477bd8d115d5d7..5a3cd0bf7ce65666de3d342af6d44ec23e45ab7d 100644 --- a/include/Algo/MovingObjects/particle_cell_3D_memo.hpp +++ b/include/Algo/MovingObjects/particle_cell_3D_memo.hpp @@ -22,7 +22,7 @@ * * *******************************************************************************/ - #define DEBUG +// #define DEBUG namespace CGoGN { diff --git a/include/Geometry/plane_3d.h b/include/Geometry/plane_3d.h index 24b07d651db0c92f385d8eb49294890eec356d44..bec8c766244ef9ae059cd30a9de1e5891a372817 100644 --- a/include/Geometry/plane_3d.h +++ b/include/Geometry/plane_3d.h @@ -108,8 +108,8 @@ class Plane3D friend std::istream& operator>>(std::istream& in, Plane3D& p); private: - Vector<3,T> m_normal ; - T m_d ; + Vector<3,T> m_normal ; // normale au plan + T m_d ; //distance a l'origine } ; } // namespace Geom