particle_cell_2D_memo.h 1.53 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2
#ifndef PARTCELL2DMEMO_H
#define PARTCELL2DMEMO_H
Pierre Kraemer's avatar
Pierre Kraemer committed
3

4
//#define DEBUG
Pierre Kraemer's avatar
Pierre Kraemer committed
5 6

#include "Algo/MovingObjects/particle_cell_2D.h"
Pierre Kraemer's avatar
Pierre Kraemer committed
7 8 9 10

#include "Algo/Geometry/inclusion.h"
#include "Geometry/intersection.h"
#include "Geometry/orientation.h"
Pierre Kraemer's avatar
Pierre Kraemer committed
11

Pierre Kraemer's avatar
Pierre Kraemer committed
12 13 14
#include <iostream>

/* A particle cell is a particle base within a map, within a precise cell, the displacement function should indicate
David Cazier's avatar
David Cazier committed
15
 after each displacement wherein lies the new position of the particle */
Pierre Kraemer's avatar
Pierre Kraemer committed
16 17 18 19 20 21 22

namespace CGoGN
{

namespace Algo
{

23 24 25
namespace Surface
{

Pierre Kraemer's avatar
Pierre Kraemer committed
26 27 28 29 30 31
namespace MovingObjects
{

template <typename PFP>
class ParticleCell2DMemo : public ParticleCell2D<PFP>
{
David Cazier's avatar
David Cazier committed
32 33
public:
	typedef typename PFP::MAP MAP ;
Pierre Kraemer's avatar
Pierre Kraemer committed
34
	typedef typename PFP::VEC3 VEC3;
35
	typedef VertexAttribute<VEC3, MAP> TAB_POS ;
Pierre Kraemer's avatar
Pierre Kraemer committed
36

David Cazier's avatar
David Cazier committed
37
private:
Pierre Kraemer's avatar
Pierre Kraemer committed
38 39
	ParticleCell2DMemo()
	{
David Cazier's avatar
David Cazier committed
40
	}
Pierre Kraemer's avatar
Pierre Kraemer committed
41

David Cazier's avatar
David Cazier committed
42
public:
Pierre Kraemer's avatar
Pierre Kraemer committed
43

David Cazier's avatar
David Cazier committed
44
	ParticleCell2DMemo(MAP& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos) :
pitiot's avatar
pitiot committed
45
	ParticleCell2D<PFP>(map, belonging_cell, pos, tabPos)
David Cazier's avatar
David Cazier committed
46
	{
47
	}
pitiot's avatar
pitiot committed
48

49 50
	virtual ~ParticleCell2DMemo()
	{
David Cazier's avatar
David Cazier committed
51
	}
Pierre Kraemer's avatar
Pierre Kraemer committed
52

Pierre Kraemer's avatar
Pierre Kraemer committed
53 54 55
	virtual void vertexState(const VEC3& current, CellMarkerMemo<MAP, FACE>& memo_cross) ;

	virtual void edgeState(const VEC3& current, CellMarkerMemo<MAP, FACE>& memo_cross, Geom::Orientation2D sideOfEdge = Geom::ALIGNED) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
56

Pierre Kraemer's avatar
Pierre Kraemer committed
57
	virtual void faceState(const VEC3& current, CellMarkerMemo<MAP, FACE>& memo_cross) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
58

Pierre Kraemer's avatar
Pierre Kraemer committed
59
	std::vector<Dart> move(const VEC3& goal, CellMarkerMemo<MAP, FACE>& memo_cross) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
60

pitiot's avatar
part  
pitiot committed
61
	std::vector<Dart> move(const VEC3& goal);
David Cazier's avatar
David Cazier committed
62
} ;
Pierre Kraemer's avatar
Pierre Kraemer committed
63

Pierre Kraemer's avatar
Pierre Kraemer committed
64 65 66 67 68 69 70
} // namespace MovingObjects

} // namespace Surface

} // namespace Algo

} // namespace CGoGN
71

Pierre Kraemer's avatar
Pierre Kraemer committed
72
#include "Algo/MovingObjects/particle_cell_2D_memo.hpp"
Pierre Kraemer's avatar
Pierre Kraemer committed
73 74

#endif