Commit efef8888 authored by Pierre Kraemer's avatar Pierre Kraemer

ParticleCell2D -> add changeCell bool

parent f0b50352
......@@ -40,6 +40,8 @@ class ParticleCell2D : public ParticleBase
DartMarker& obstacle;
bool changeCell ;
ParticleCell2D() {}
ParticleCell2D(Map& map, Dart belonging_cell, VEC3 pos, TAB_POS tabPos, DartMarker& obst) : ParticleBase(pos), m(map), d(belonging_cell), m_positions(tabPos), obstacle(obst)
......@@ -71,6 +73,7 @@ class ParticleCell2D : public ParticleBase
void move(const VEC3& newCurrent)
{
changeCell = false ;
if(!Geom::arePointsEquals(newCurrent, m_position)) {
prevPos = m_position;
......
......@@ -69,6 +69,7 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& current)
#endif
assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2]));
changeCell = true;
if(Algo::Geometry::isPointOnVertex<PFP>(m,d,m_positions,current)) {
state = VERTEX_ORBIT;
return;
......@@ -135,6 +136,7 @@ void ParticleCell2D<PFP>::edgeState(const VEC3& current, Geom::Orientation2D sid
assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2]));
// assert(Algo::Geometry::isPointOnEdge<PFP>(m,d,m_positions,m_position));
changeCell = true;
if(sideOfEdge==Geom::ALIGNED)
sideOfEdge = getOrientationEdge(current,d);
......
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