Commit a3dd8899 authored by Thomas's avatar Thomas

modif mineure MovingObjects

parent c3509197
......@@ -31,6 +31,11 @@ class ParticleBase
m_position = position;
}
virtual unsigned int getState()
{
return 0;
}
/**
* @param newPosition new position to reach
*/
......
......@@ -76,6 +76,11 @@ public :
void faceState(const VEC3& current);
virtual unsigned int getState()
{
return state;
}
void move(const VEC3& newCurrent)
{
crossCell = NO_CROSS ;
......
......@@ -70,6 +70,11 @@ public :
void faceState(VEC3 current);
virtual unsigned int getState()
{
return state;
}
void move(const VEC3& newCurrent)
{
crossCell = NO_CROSS ;
......
......@@ -221,6 +221,16 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 current)
assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2]));
// assert(Algo::Geometry::isPointInConvexFace2D<PFP>(m,d,m_positions,m_position,true));
//project current within plane
VEC3 n1 = Algo::Geometry::faceNormal<PFP>(m,d,m_positions);
VEC3 n2 = current-m_position;
n1.normalize();
VEC3 n3 = n1^n2;
n3.normalize();
VEC3 n4 = n3^n1;
current = m_position+(n2*n4)*n4;
//track new position within map
Dart dd = d;
float wsoe = getOrientationFace(current, m_position, m.phi1(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