Commit 9b375901 authored by David Cazier's avatar David Cazier

-

parent acac17ce
...@@ -362,11 +362,7 @@ void MyQT::cb_keyPress(int keycode) ...@@ -362,11 +362,7 @@ void MyQT::cb_keyPress(int keycode)
// Sélectionne des faces // Sélectionne des faces
case 'f': case 'f':
d_faces.clear(); d_faces.clear();
<<<<<<< HEAD:Apps/Examples/tutoriel.cpp
Algo::Selection:: facesRaySelection<PFP>(myQuadMesh, position, SelectorTrue(), rayA, AB, d_faces); Algo::Selection:: facesRaySelection<PFP>(myQuadMesh, position, SelectorTrue(), rayA, AB, d_faces);
=======
Algo::Selection::facesRaySelection<PFP>(myMap, position, SelectorTrue(), rayA, AB, d_faces);
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e:Apps/deprecated/tutoriel.cpp
if (!d_faces.empty()) if (!d_faces.empty())
{ {
......
#ifndef PARTCELL_H #ifndef PARTCELL_H
#define PARTCELL_H #define PARTCELL_H
<<<<<<< HEAD
#include <iostream>
=======
#include "Algo/MovingObjects/particle_base.h" #include "Algo/MovingObjects/particle_base.h"
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e
#include "Algo/Geometry/inclusion.h" #include "Algo/Geometry/inclusion.h"
#include "Geometry/intersection.h" #include "Geometry/intersection.h"
#include "Algo/Geometry/orientation.h" #include "Algo/Geometry/orientation.h"
#include "particle_base.h"
/* A particle cell is a particle base within a map, within a precise cell, /* A particle cell is a particle base within a map, within a precise cell,
* the displacement function should indicate after each displacement * the displacement function should indicate after each displacement
* wherein lies the new position of the particle * wherein lies the new position of the particle
...@@ -38,11 +31,7 @@ class ParticleCell2D : public ParticleBase<PFP> ...@@ -38,11 +31,7 @@ class ParticleCell2D : public ParticleBase<PFP>
public: public:
typedef typename PFP::MAP Map ; typedef typename PFP::MAP Map ;
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
<<<<<<< HEAD
typedef typename PFP::TVEC3 TAB_POS ;
=======
typedef VertexAttribute<typename PFP::VEC3> TAB_POS; typedef VertexAttribute<typename PFP::VEC3> TAB_POS;
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e
Map& m ; Map& m ;
...@@ -53,10 +42,10 @@ public: ...@@ -53,10 +42,10 @@ public:
unsigned int crossCell ; unsigned int crossCell ;
ParticleCell2D(Map& map) : // ParticleCell2D(Map& map) :
m(map) // m(map)
{ // {
} // }
ParticleCell2D(Map& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos) : ParticleCell2D(Map& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos) :
ParticleBase<PFP>(pos), ParticleBase<PFP>(pos),
......
...@@ -73,45 +73,25 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& goal) ...@@ -73,45 +73,25 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& goal)
else else
{ {
//orientation step //orientation step
<<<<<<< HEAD
if (positionAttribut[d][0] == positionAttribut[m.phi1(d)][0]
&& positionAttribut[d][1] == positionAttribut[m.phi1(d)][1]) d = m.alpha1(d) ;
if (getOrientationEdge(goal, m.alpha1(d)) != Geom::RIGHT)
=======
if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1]) if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1])
d = m.phi2_1(d); d = m.phi2_1(d);
if(getOrientationEdge(current,m.phi2_1(d)) != Geom::RIGHT) if(getOrientationEdge(current,m.phi2_1(d)) != Geom::RIGHT)
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e
{ {
Dart dd_vert = d ; Dart dd_vert = d ;
do do
{ {
<<<<<<< HEAD
d = m.alpha1(d) ;
if (positionAttribut[d][0] == positionAttribut[m.phi1(d)][0]
&& positionAttribut[d][1] == positionAttribut[m.phi1(d)][1]) d = m.alpha1(d) ;
} while (getOrientationEdge(goal, m.alpha1(d)) != Geom::RIGHT && dd_vert != d) ;
=======
d = m.phi2_1(d); d = m.phi2_1(d);
if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1]) if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1])
d = m.phi2_1(d); d = m.phi2_1(d);
} while(getOrientationEdge(current, m.phi2_1(d)) != Geom::RIGHT && dd_vert != d); } while(getOrientationEdge(current, m.phi2_1(d)) != Geom::RIGHT && dd_vert != d);
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e
if (dd_vert == d) if (dd_vert == d)
{ {
//orbit with 2 edges : point on one edge //orbit with 2 edges : point on one edge
<<<<<<< HEAD
if (m.alpha1(m.alpha1(d)) == d)
{
if (!Algo::Geometry::isPointOnHalfEdge < PFP > (m, d, positionAttribut, goal)) d = m.alpha1(
d) ;
=======
if(m.phi2_1(m.phi2_1(d)) == d) if(m.phi2_1(m.phi2_1(d)) == d)
{ {
if(!Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,m_positions,current)) if(!Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,m_positions,current))
d = m.phi2_1(d); d = m.phi2_1(d);
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e
} }
else else
{ {
...@@ -123,21 +103,12 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& goal) ...@@ -123,21 +103,12 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& goal)
} }
else else
{ {
<<<<<<< HEAD
Dart dd_vert = m.alpha1(d) ;
while (getOrientationEdge(goal, d) == Geom::RIGHT && dd_vert != d)
{
d = m.alpha_1(d) ;
if (positionAttribut[d][0] == positionAttribut[m.phi1(d)][0]
&& positionAttribut[d][1] == positionAttribut[m.phi1(d)][1]) d = m.alpha_1(d) ;
=======
Dart dd_vert = m.phi2_1(d); Dart dd_vert = m.phi2_1(d);
while(getOrientationEdge(current, d) == Geom::RIGHT && dd_vert != d) while(getOrientationEdge(current, d) == Geom::RIGHT && dd_vert != d)
{ {
d = m.phi12(d); d = m.phi12(d);
if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1]) if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1])
d = m.phi12(d); d = m.phi12(d);
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e
} }
} }
......
...@@ -101,39 +101,24 @@ void ParticleCell2DAndHalf<PFP>::vertexState(VEC3 goal) ...@@ -101,39 +101,24 @@ void ParticleCell2DAndHalf<PFP>::vertexState(VEC3 goal)
{ {
//orientation step //orientation step
if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1]) if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1])
<<<<<<< HEAD
d = m.alpha1(d);
if(getOrientationEdge(goal,m.alpha1(d)) != Geom::UNDER)
=======
d = m.phi2_1(d); d = m.phi2_1(d);
if(getOrientationEdge(current,m.phi2_1(d)) != Geom::UNDER) if(getOrientationEdge(current,m.phi2_1(d)) != Geom::UNDER)
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e
{ {
Dart dd_vert = d; Dart dd_vert = d;
do do
{ {
d = m.phi2_1(d); d = m.phi2_1(d);
if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1]) if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1])
<<<<<<< HEAD
d = m.alpha1(d);
} while(getOrientationEdge(goal, m.alpha1(d)) != Geom::UNDER && dd_vert != d);
=======
d = m.phi2_1(d); d = m.phi2_1(d);
} while(getOrientationEdge(current, m.phi2_1(d)) != Geom::UNDER && dd_vert != d); } while(getOrientationEdge(current, m.phi2_1(d)) != Geom::UNDER && dd_vert != d);
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e
if(dd_vert == d) if(dd_vert == d)
{ {
//orbit with 2 edges : point on one edge //orbit with 2 edges : point on one edge
if(m.phi2_1(m.phi2_1(d)) == d) if(m.phi2_1(m.phi2_1(d)) == d)
{ {
<<<<<<< HEAD
if(!Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,m_positions,goal))
d = m.alpha1(d);
=======
if(!Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,m_positions,current)) if(!Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,m_positions,current))
d = m.phi2_1(d); d = m.phi2_1(d);
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e
} }
else else
{ {
...@@ -145,13 +130,8 @@ void ParticleCell2DAndHalf<PFP>::vertexState(VEC3 goal) ...@@ -145,13 +130,8 @@ void ParticleCell2DAndHalf<PFP>::vertexState(VEC3 goal)
} }
else else
{ {
<<<<<<< HEAD
Dart dd_vert = m.alpha1(d);
while(getOrientationEdge(goal, d) == Geom::OVER && dd_vert != d)
=======
Dart dd_vert = m.phi2_1(d); Dart dd_vert = m.phi2_1(d);
while(getOrientationEdge(current, d) == Geom::OVER && dd_vert != d) while(getOrientationEdge(current, d) == Geom::OVER && dd_vert != d)
>>>>>>> 69653d4f2ddc874cfdf5765126462ba58105052e
{ {
d = m.phi12(d); d = m.phi12(d);
if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1]) if(m_positions[d][0] == m_positions[m.phi1(d)][0] && m_positions[d][1] == m_positions[m.phi1(d)][1])
......
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