particle_cell_2D.hpp 9.49 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3
template <typename PFP>
void ParticleCell2D<PFP>::display()
{
4 5 6
// 	CGoGNout << "pos : " << this->m_position << CGoGNendl;
// 	CGoGNout << "d : " << this->d << CGoGNendl;
// 	CGoGNout << "state : " << this->state << CGoGNendl;
Pierre Kraemer's avatar
Pierre Kraemer committed
7 8 9 10 11
}

template <typename PFP>
typename PFP::VEC3 ParticleCell2D<PFP>::pointInFace(Dart d)
{
David Cazier's avatar
-  
David Cazier committed
12 13 14 15 16 17 18 19 20 21
	const VEC3& p1(positionAttribut[d]) ;
	Dart dd = m.phi1(d) ;
	const VEC3& p2(positionAttribut[dd]) ;
	dd = m.phi1(dd) ;
	VEC3& p3(positionAttribut[dd]) ;

	while (Geom::testOrientation2D(p3, p1, p2) == Geom::ALIGNED)
	{
		dd = m.phi1(dd) ;
		p3 = positionAttribut[dd] ;
Pierre Kraemer's avatar
Pierre Kraemer committed
22 23
	}

David Cazier's avatar
-  
David Cazier committed
24
	CGoGNout << "pointInFace " << (p1 + p3) * 0.5f << CGoGNendl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
25

David Cazier's avatar
-  
David Cazier committed
26
	return (p1 + p3) * 0.5f ;
Pierre Kraemer's avatar
Pierre Kraemer committed
27 28 29 30 31
}

template <typename PFP>
Geom::Orientation2D ParticleCell2D<PFP>::getOrientationEdge(const VEC3& point, Dart d)
{
David Cazier's avatar
-  
David Cazier committed
32 33
	const VEC3& endPoint = positionAttribut[m.phi2(d)] ;
	const VEC3& vertexPoint = positionAttribut[d] ;
Pierre Kraemer's avatar
Pierre Kraemer committed
34

David Cazier's avatar
-  
David Cazier committed
35
	return Geom::testOrientation2D(point, vertexPoint, endPoint) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
36 37 38 39 40
}

template <typename PFP>
typename PFP::VEC3 ParticleCell2D<PFP>::intersectLineEdge(const VEC3& pA, const VEC3& pB, Dart d)
{
David Cazier's avatar
-  
David Cazier committed
41 42 43
	VEC3 q1 = positionAttribut[d] ;
	VEC3 q2 = positionAttribut[m.phi2(d)] ;
	VEC3 Inter ;
Pierre Kraemer's avatar
Pierre Kraemer committed
44

David Cazier's avatar
-  
David Cazier committed
45
	Geom::intersection2DSegmentSegment(pA, pB, q1, q2, Inter) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
46

David Cazier's avatar
-  
David Cazier committed
47
	return Inter ;
Pierre Kraemer's avatar
Pierre Kraemer committed
48 49 50
}

template <typename PFP>
David Cazier's avatar
David Cazier committed
51
Geom::Orientation2D ParticleCell2D<PFP>::getOrientationFace(VEC3 goal, Dart d)
Pierre Kraemer's avatar
Pierre Kraemer committed
52
{
David Cazier's avatar
David Cazier committed
53 54 55
	const VEC3& p1 = this->getPosition() ;
	const VEC3& p2 = positionAttribut[d] ;
	return Geom::testOrientation2D(goal, p1, p2) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
56 57 58
}

template <typename PFP>
David Cazier's avatar
-  
David Cazier committed
59
void ParticleCell2D<PFP>::vertexState(const VEC3& goal)
Pierre Kraemer's avatar
Pierre Kraemer committed
60
{
David Cazier's avatar
-  
David Cazier committed
61 62 63
#ifdef DEBUG
	CGoGNout << "vertexState" << d << CGoGNendl ;
#endif
David Cazier's avatar
David Cazier committed
64
	assert(goal.isFinite()) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
65

David Cazier's avatar
-  
David Cazier committed
66
	crossCell = CROSS_OTHER ;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
67

David Cazier's avatar
-  
David Cazier committed
68
	if (Algo::Geometry::isPointOnVertex < PFP > (m, d, positionAttribut, goal))
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
69
	{
David Cazier's avatar
-  
David Cazier committed
70 71 72
		this->setState(VERTEX) ;
		this->ParticleBase < PFP > ::move(goal) ;
		return ;
Pierre Kraemer's avatar
Pierre Kraemer committed
73
	}
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
74 75
	else
	{
Pierre Kraemer's avatar
Pierre Kraemer committed
76
		//orientation step
David Cazier's avatar
David Cazier committed
77
		if(positionAttribut[d][0] == positionAttribut[m.phi1(d)][0] && positionAttribut[d][1] == positionAttribut[m.phi1(d)][1])
78
			d = m.phi2_1(d);
David Cazier's avatar
David Cazier committed
79
		if(getOrientationEdge(goal,m.phi2_1(d)) != Geom::RIGHT)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
80
		{
David Cazier's avatar
-  
David Cazier committed
81
			Dart dd_vert = d ;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
82 83
			do
			{
84
				d = m.phi2_1(d);
David Cazier's avatar
David Cazier committed
85
				if(positionAttribut[d][0] == positionAttribut[m.phi1(d)][0] && positionAttribut[d][1] == positionAttribut[m.phi1(d)][1])
86
					d = m.phi2_1(d);
David Cazier's avatar
David Cazier committed
87
			} while(getOrientationEdge(goal, m.phi2_1(d)) != Geom::RIGHT && dd_vert != d);
Pierre Kraemer's avatar
Pierre Kraemer committed
88

David Cazier's avatar
-  
David Cazier committed
89
			if (dd_vert == d)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
90
			{
Pierre Kraemer's avatar
Pierre Kraemer committed
91
				//orbit with 2 edges : point on one edge
92
				if(m.phi2_1(m.phi2_1(d)) == d)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
93
				{
David Cazier's avatar
David Cazier committed
94
					if(!Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,positionAttribut,goal))
95
						d = m.phi2_1(d);
Pierre Kraemer's avatar
Pierre Kraemer committed
96
				}
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
97 98
				else
				{
99 100 101 102
					//checking : case with 3 orthogonal darts and point on an edge
					do
					{
						if(Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,positionAttribut,goal)
Jund Thomas's avatar
Jund Thomas committed
103
								&& Algo::Geometry::isPointOnHalfEdge<PFP>(m,this->m.phi2(d),positionAttribut,goal)
Jund Thomas's avatar
Jund Thomas committed
104
								&& this->getOrientationEdge(goal, this->d) == Geom::ALIGNED)
105 106 107 108 109 110 111 112
						{
							edgeState(goal) ;
							return;
						}
						this->d = this->m.phi2_1(this->d) ;
					} while (this->getOrientationEdge(goal, this->m.phi2_1(this->d)) != Geom::RIGHT && dd_vert != this->d) ;


David Cazier's avatar
-  
David Cazier committed
113 114 115
					this->setState(VERTEX) ;
					this->ParticleBase < PFP > ::move(goal) ;
					return ;
Pierre Kraemer's avatar
Pierre Kraemer committed
116 117 118
				}
			}
		}
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
119 120
		else
		{
121
			Dart dd_vert = m.phi2_1(d);
David Cazier's avatar
David Cazier committed
122
			while(getOrientationEdge(goal, d) == Geom::RIGHT && dd_vert != d)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
123
			{
124
				d = m.phi12(d);
David Cazier's avatar
David Cazier committed
125
				if(positionAttribut[d][0] == positionAttribut[m.phi1(d)][0] && positionAttribut[d][1] == positionAttribut[m.phi1(d)][1])
126
					d = m.phi12(d);
Pierre Kraemer's avatar
Pierre Kraemer committed
127 128 129 130
			}
		}

		//displacement step
David Cazier's avatar
-  
David Cazier committed
131 132 133
		if (getOrientationEdge(goal, d) == Geom::ALIGNED
		    && Algo::Geometry::isPointOnHalfEdge < PFP > (m, d, positionAttribut, goal))
			edgeState(goal) ;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
134 135
		else
		{
David Cazier's avatar
-  
David Cazier committed
136 137
			d = m.phi1(d) ;
			faceState(goal) ;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
138
		}
Pierre Kraemer's avatar
Pierre Kraemer committed
139 140 141 142
	}
}

template <typename PFP>
David Cazier's avatar
-  
David Cazier committed
143
void ParticleCell2D<PFP>::edgeState(const VEC3& goal, Geom::Orientation2D sideOfEdge)
Pierre Kraemer's avatar
Pierre Kraemer committed
144
{
David Cazier's avatar
-  
David Cazier committed
145 146 147
#ifdef DEBUG
	CGoGNout << "edgeState" << d << CGoGNendl ;
#endif
Pierre Kraemer's avatar
Pierre Kraemer committed
148

David Cazier's avatar
David Cazier committed
149
	assert(goal.isFinite()) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
150 151
// 	assert(Algo::Geometry::isPointOnEdge<PFP>(m,d,m_positions,m_position));

David Cazier's avatar
-  
David Cazier committed
152
	if (crossCell == NO_CROSS)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
153
	{
David Cazier's avatar
-  
David Cazier committed
154 155
		crossCell = CROSS_EDGE ;
		lastCrossed = d ;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
156 157
	}
	else
David Cazier's avatar
-  
David Cazier committed
158
		crossCell = CROSS_OTHER ;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
159

David Cazier's avatar
-  
David Cazier committed
160
	if (sideOfEdge == Geom::ALIGNED) sideOfEdge = getOrientationEdge(goal, d) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
161

David Cazier's avatar
-  
David Cazier committed
162
	switch (sideOfEdge)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
163
	{
Pierre Kraemer's avatar
Pierre Kraemer committed
164
		case Geom::LEFT :
David Cazier's avatar
-  
David Cazier committed
165 166 167 168 169 170 171
			d = m.phi1(d) ;
			faceState(goal) ;
			return ;
		case Geom::RIGHT :
			d = m.phi1(m.phi2(d)) ;
			faceState(goal) ;
			return ;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
172
		default :
David Cazier's avatar
-  
David Cazier committed
173 174
			this->setState(EDGE) ;
			break ;
Pierre Kraemer's avatar
Pierre Kraemer committed
175 176
	}

David Cazier's avatar
-  
David Cazier committed
177
	if (!Algo::Geometry::isPointOnHalfEdge < PFP > (m, d, positionAttribut, goal))
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
178
	{
David Cazier's avatar
-  
David Cazier committed
179 180 181
		this->ParticleBase < PFP > ::move(positionAttribut[d]) ;
		vertexState(goal) ;
		return ;
Pierre Kraemer's avatar
Pierre Kraemer committed
182
	}
David Cazier's avatar
-  
David Cazier committed
183
	else if (!Algo::Geometry::isPointOnHalfEdge < PFP > (m, m.phi2(d), positionAttribut, goal))
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
184
	{
David Cazier's avatar
-  
David Cazier committed
185 186 187 188
		d = m.phi2(d) ;
		this->ParticleBase < PFP > ::move(positionAttribut[d]) ;
		vertexState(goal) ;
		return ;
Pierre Kraemer's avatar
Pierre Kraemer committed
189
	}
190

David Cazier's avatar
-  
David Cazier committed
191
	this->ParticleBase < PFP > ::move(goal) ;
192 193 194 195 196
}

template <typename PFP>
Dart ParticleCell2D<PFP>::faceOrientationState(const VEC3& toward)
{
David Cazier's avatar
-  
David Cazier committed
197 198 199
#ifdef DEBUG
	CGoGNout << "faceOrientationState" << d << CGoGNendl ;
#endif
200

David Cazier's avatar
-  
David Cazier committed
201 202
	assert(this->getPosition().isnormal());
	assert(toward.isnormal());
203

David Cazier's avatar
-  
David Cazier committed
204 205
	Dart res = d ;
	Dart dd = d ;
David Cazier's avatar
David Cazier committed
206
	float wsoe = getOrientationFace(toward, m.phi1(res)) ;
207 208

	// orientation step
David Cazier's avatar
-  
David Cazier committed
209
	if (wsoe != Geom::RIGHT)
210
	{
David Cazier's avatar
-  
David Cazier committed
211
		res = m.phi1(res) ;
David Cazier's avatar
David Cazier committed
212
		wsoe = getOrientationFace(toward, m.phi1(res)) ;
David Cazier's avatar
-  
David Cazier committed
213
		while (wsoe != Geom::RIGHT && dd != res)
214
		{
David Cazier's avatar
-  
David Cazier committed
215
			res = m.phi1(res) ;
David Cazier's avatar
David Cazier committed
216
			wsoe = getOrientationFace(toward, m.phi1(res)) ;
217 218
		}

David Cazier's avatar
-  
David Cazier committed
219 220
		// source and position to reach are the same : verify if no edge is crossed due to numerical approximation
		if (dd == res)
221 222 223 224 225
		{
			do
			{
				switch (getOrientationEdge(toward, res))
				{
David Cazier's avatar
-  
David Cazier committed
226 227 228 229 230 231 232
					case Geom::LEFT :
						res = m.phi1(res) ;
						break ;
					case Geom::ALIGNED :
						return res ;
					case Geom::RIGHT :
						return res ;
233
				}
David Cazier's avatar
-  
David Cazier committed
234 235
			} while (res != dd) ;
			return res ;
236 237 238 239
		}
	}
	else
	{
David Cazier's avatar
David Cazier committed
240
		wsoe = getOrientationFace(toward, d) ;
David Cazier's avatar
-  
David Cazier committed
241
		while (wsoe == Geom::RIGHT && m.phi_1(res) != dd)
242
		{
David Cazier's avatar
-  
David Cazier committed
243
			res = m.phi_1(res) ;
David Cazier's avatar
David Cazier committed
244
			wsoe = getOrientationFace(toward, res) ;
245 246 247
		}

		// in case of numerical incoherence
David Cazier's avatar
-  
David Cazier committed
248
		if (m.phi_1(res) == dd && wsoe == Geom::RIGHT)
249
		{
David Cazier's avatar
-  
David Cazier committed
250
			res = m.phi_1(res) ;
251 252 253 254
			do
			{
				switch (getOrientationEdge(toward, res))
				{
David Cazier's avatar
-  
David Cazier committed
255 256 257 258 259 260 261
					case Geom::LEFT :
						res = m.phi1(res) ;
						break ;
					case Geom::ALIGNED :
						return res ;
					case Geom::RIGHT :
						return res ;
262
				}
David Cazier's avatar
-  
David Cazier committed
263
			} while (res != dd) ;
264

David Cazier's avatar
-  
David Cazier committed
265
			return res ;
266 267 268
		}
	}

David Cazier's avatar
-  
David Cazier committed
269
	return res ;
Pierre Kraemer's avatar
Pierre Kraemer committed
270 271 272
}

template <typename PFP>
David Cazier's avatar
-  
David Cazier committed
273
void ParticleCell2D<PFP>::faceState(const VEC3& goal)
Pierre Kraemer's avatar
Pierre Kraemer committed
274
{
David Cazier's avatar
-  
David Cazier committed
275 276 277
#ifdef DEBUG
	CGoGNout << "faceState" << d << CGoGNendl ;
#endif
Pierre Kraemer's avatar
Pierre Kraemer committed
278

David Cazier's avatar
David Cazier committed
279 280
	assert(this->getPosition().isFinite());
	assert(goal.isFinite()) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
281 282
// 	assert(Algo::Geometry::isPointInConvexFace2D<PFP>(m,d,m_positions,m_position,true));

David Cazier's avatar
-  
David Cazier committed
283
	Dart dd = d ;
David Cazier's avatar
David Cazier committed
284
	float wsoe = getOrientationFace(goal, m.phi1(d)) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
285

Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
286
	// orientation step
David Cazier's avatar
-  
David Cazier committed
287
	if (wsoe != Geom::RIGHT)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
288
	{
David Cazier's avatar
-  
David Cazier committed
289
		d = m.phi1(d) ;
David Cazier's avatar
David Cazier committed
290
		wsoe = getOrientationFace(goal, m.phi1(d)) ;
David Cazier's avatar
-  
David Cazier committed
291
		while (wsoe != Geom::RIGHT && dd != d)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
292
		{
David Cazier's avatar
-  
David Cazier committed
293
			d = m.phi1(d) ;
David Cazier's avatar
David Cazier committed
294
			wsoe = getOrientationFace(goal, m.phi1(d)) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
295 296
		}

David Cazier's avatar
-  
David Cazier committed
297 298
		// source and position to reach are the same : verify if no edge is crossed due to numerical approximation
		if (dd == d)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
299 300 301
		{
			do
			{
David Cazier's avatar
-  
David Cazier committed
302
				switch (getOrientationEdge(goal, d))
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
303
				{
David Cazier's avatar
-  
David Cazier committed
304 305 306 307 308 309 310 311 312 313 314
					case Geom::LEFT :
						d = m.phi1(d) ;
						break ;
					case Geom::ALIGNED :
						this->ParticleBase<PFP>::move(goal) ;
						edgeState(goal) ;
						return ;
					case Geom::RIGHT :
						this->ParticleBase<PFP>::move(intersectLineEdge(goal, this->getPosition(), d)) ;
						edgeState(goal, Geom::RIGHT) ;
						return ;
Pierre Kraemer's avatar
Pierre Kraemer committed
315
				}
David Cazier's avatar
-  
David Cazier committed
316 317 318
			} while (d != dd) ;
			this->ParticleBase<PFP>::move(goal) ;
			this->setState(FACE) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
319 320 321 322 323 324 325 326

// 			m_position = Algo::Geometry::faceCentroid<PFP>(m,d,m_positions);
// 			d = m.phi1(d);
// 			m_position = pointInFace(d);
// 			faceState(current);

// 			m_position = m_positions[d];
// 			vertexState(current);
David Cazier's avatar
-  
David Cazier committed
327
			return ;
Pierre Kraemer's avatar
Pierre Kraemer committed
328
		}
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
329
		// take the orientation with d1 : in case we are going through a vertex
David Cazier's avatar
David Cazier committed
330
		wsoe = getOrientationFace(goal, d) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
331
	}
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
332 333
	else
	{
David Cazier's avatar
David Cazier committed
334
		wsoe = getOrientationFace(goal, d) ;
David Cazier's avatar
-  
David Cazier committed
335
		while (wsoe == Geom::RIGHT && m.phi_1(d) != dd)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
336
		{
David Cazier's avatar
-  
David Cazier committed
337
			d = m.phi_1(d) ;
David Cazier's avatar
David Cazier committed
338
			wsoe = getOrientationFace(goal, d) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
339 340
		}

Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
341
		// in case of numerical incoherence
David Cazier's avatar
-  
David Cazier committed
342
		if (m.phi_1(d) == dd && wsoe == Geom::RIGHT)
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
343
		{
David Cazier's avatar
-  
David Cazier committed
344
			d = m.phi_1(d) ;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
345 346
			do
			{
David Cazier's avatar
-  
David Cazier committed
347
				switch (getOrientationEdge(goal, d))
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
348
				{
David Cazier's avatar
-  
David Cazier committed
349 350 351 352
					case Geom::LEFT :
						d = m.phi1(d) ;
						break ;
					case Geom::ALIGNED :
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
353
// 					CGoGNout << "pic" << CGoGNendl;
David Cazier's avatar
-  
David Cazier committed
354 355 356 357
						this->ParticleBase<PFP>::move(goal) ;
						edgeState(goal) ;
						return ;
					case Geom::RIGHT :
358
//					CGoGNout << "smthg went bad(2) " << m_position << CGoGNendl;
David Cazier's avatar
-  
David Cazier committed
359
						this->ParticleBase<PFP>::move(intersectLineEdge(goal, this->getPosition(), d)) ;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
360
// 					CGoGNout << " " << m_position << CGoGNendl;
David Cazier's avatar
-  
David Cazier committed
361 362
						edgeState(goal, Geom::RIGHT) ;
						return ;
Pierre Kraemer's avatar
Pierre Kraemer committed
363
				}
David Cazier's avatar
-  
David Cazier committed
364
			} while (d != dd) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
365

David Cazier's avatar
-  
David Cazier committed
366 367 368
			this->ParticleBase<PFP>::move(goal) ;
			this->setState(FACE) ;
			return ;
Pierre Kraemer's avatar
Pierre Kraemer committed
369 370 371 372
		}
	}

	//displacement step
David Cazier's avatar
-  
David Cazier committed
373
	switch (getOrientationEdge(goal, d))
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
374
	{
David Cazier's avatar
-  
David Cazier committed
375 376 377 378 379
		case Geom::LEFT :
			this->ParticleBase<PFP>::move(goal) ;
			this->setState(FACE) ;
			;
			break ;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
380 381 382
// 	case Geom::ALIGNED :
//		if(wsoe==Geom::ALIGNED) {
// 			m_position = m_positions[d];
David Cazier's avatar
-  
David Cazier committed
383
// 			vertexState(curgoalrent);
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
384 385 386 387
// 		}
// 		else {
// 			CGoGNout << "poc" << CGoGNendl;
// 			m_position = current;
388
// 			state = EDGE;
Pierre Kraemer's avatar
merge..  
Pierre Kraemer committed
389 390
// 		}
// 		break;
David Cazier's avatar
-  
David Cazier committed
391 392 393 394 395 396 397 398 399 400 401 402 403
		default :
			if (wsoe == Geom::ALIGNED)
			{
				d = m.phi1(d) ; //to check
				this->ParticleBase<PFP>::move(positionAttribut[d]) ;
				vertexState(goal) ;
			}
			else
			{
				this->ParticleBase<PFP>::move(intersectLineEdge(goal, this->getPosition(), d)) ;
				edgeState(goal, Geom::RIGHT) ;
			}
			break ;
Pierre Kraemer's avatar
Pierre Kraemer committed
404 405
	}
}