Commit 61fbdd93 authored by Thomas Pitiot 's avatar Thomas Pitiot

reparé

parent b352639d
...@@ -215,9 +215,9 @@ Dart subdivideVolumeClassic(typename PFP::MAP& map, Dart d, VertexAttribute<type ...@@ -215,9 +215,9 @@ Dart subdivideVolumeClassic(typename PFP::MAP& map, Dart d, VertexAttribute<type
if(OneLevelDifference) if(OneLevelDifference)
{ {
Traversor3WF<typename PFP::MAP> traF(map, old); Traversor3WF<typename PFP::MAP> traF(map, old);
for(Dart dit = traF.begin(); dit != traF.end(); dit = traF.next()) for(Dart dit = traF.begin(); dit != traF.end(); dit = traF.next())
{ {
Dart nv = map.phi3(dit); Dart nv = map.phi3(dit);
if(!map.isBoundaryMarked(3, nv)) if(!map.isBoundaryMarked(3, nv))
if(map.volumeLevel(nv) == vLevel - 1) if(map.volumeLevel(nv) == vLevel - 1)
......
...@@ -107,7 +107,7 @@ public : ...@@ -107,7 +107,7 @@ public :
void volumeSpecialCase(const VEC3& current); void volumeSpecialCase(const VEC3& current);
void reset_positionFace();
void move(const VEC3& newCurrent) void move(const VEC3& newCurrent)
{ {
......
...@@ -39,6 +39,7 @@ namespace MovingObjects ...@@ -39,6 +39,7 @@ namespace MovingObjects
#define DELTA 0.00001 #define DELTA 0.00001
//static const float DELTA=0.00001; //static const float DELTA=0.00001;
template <typename PFP> template <typename PFP>
void ParticleCell3D<PFP>::display() void ParticleCell3D<PFP>::display()
{ {
...@@ -65,6 +66,12 @@ typename PFP::VEC3 ParticleCell3D<PFP>::pointInFace(Dart d) ...@@ -65,6 +66,12 @@ typename PFP::VEC3 ParticleCell3D<PFP>::pointInFace(Dart d)
// return (p1+p3)*0.5f; // return (p1+p3)*0.5f;
} }
template <typename PFP>
void ParticleCell3D<PFP>:: reset_positionFace()
{
this->m_positionFace=pointInFace(this->d);
}
template <typename PFP> template <typename PFP>
Geom::Orientation3D ParticleCell3D<PFP>::isLeftENextVertex(VEC3 c, Dart d, VEC3 base) Geom::Orientation3D ParticleCell3D<PFP>::isLeftENextVertex(VEC3 c, Dart d, VEC3 base)
{ {
...@@ -683,7 +690,7 @@ void ParticleCell3D<PFP>::volumeState(const VEC3& current) ...@@ -683,7 +690,7 @@ void ParticleCell3D<PFP>::volumeState(const VEC3& current)
#endif #endif
CellMarkerStore<MAP, FACE> mark(m); CellMarkerStore<MAP, FACE> mark(m);
bool above; bool above;
Geom::Orientation3D testRight=Geom::OVER; Geom::Orientation3D testRight=Geom::OVER;
...@@ -693,7 +700,9 @@ void ParticleCell3D<PFP>::volumeState(const VEC3& current) ...@@ -693,7 +700,9 @@ void ParticleCell3D<PFP>::volumeState(const VEC3& current)
Dart dd=d; Dart dd=d;
bool particularcase=false; bool particularcase=false;
Geom::Orientation3D testLeft = isLeftL1DVol(current,d,this->m_positionFace,this->m_position); Geom::Orientation3D testLeft = isLeftL1DVol(current,d,this->m_positionFace,this->m_position);
#ifdef DEBUG
std::cout << "isLEft1DVOl (current,d,m_positionFace,m_position) " << current<< " | " <<d<<" | " <<this->m_positionFace<<" | " <<this->m_position<<std::endl<<" et renvoie : "<<testLeft<< std::endl;
#endif
if(testLeft!=Geom::UNDER) { if(testLeft!=Geom::UNDER) {
d = m.phi_1(d); d = m.phi_1(d);
...@@ -728,7 +737,9 @@ void ParticleCell3D<PFP>::volumeState(const VEC3& current) ...@@ -728,7 +737,9 @@ void ParticleCell3D<PFP>::volumeState(const VEC3& current)
this->m_position = current; this->m_position = current;
return; return;
} }
#ifdef DEBUG
std::cout << "volumeState va dans special case cas 1 " << d << std::endl;
#endif
volumeSpecialCase(current); volumeSpecialCase(current);
return; return;
} }
...@@ -750,6 +761,9 @@ void ParticleCell3D<PFP>::volumeState(const VEC3& current) ...@@ -750,6 +761,9 @@ void ParticleCell3D<PFP>::volumeState(const VEC3& current)
mark.mark(d); mark.mark(d);
if(d==dd) { if(d==dd) {
#ifdef DEBUG
std::cout << "volumeState va dans special case cas 2 " << d << std::endl;
#endif
volumeSpecialCase(current); volumeSpecialCase(current);
return; return;
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#define DEBUG // #define DEBUG
namespace CGoGN namespace CGoGN
{ {
......
...@@ -108,8 +108,8 @@ class Plane3D ...@@ -108,8 +108,8 @@ class Plane3D
friend std::istream& operator>>(std::istream& in, Plane3D<TT>& p); friend std::istream& operator>>(std::istream& in, Plane3D<TT>& p);
private: private:
Vector<3,T> m_normal ; Vector<3,T> m_normal ; // normale au plan
T m_d ; T m_d ; //distance a l'origine
} ; } ;
} // namespace Geom } // namespace Geom
......
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