particle_cell_2D_memo.h 1.3 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1
2
#ifndef PARTCELL2DMEMO_H
#define PARTCELL2DMEMO_H
Jund Thomas's avatar
Jund Thomas committed
3
//#define DEBUG
Pierre Kraemer's avatar
Pierre Kraemer committed
4
5
6
7
8
9
10
11
#include "particle_cell_2D.h"

#include "Algo/Geometry/inclusion.h"
#include "Geometry/intersection.h"
#include "Geometry/orientation.h"
#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
12
 after each displacement wherein lies the new position of the particle */
Pierre Kraemer's avatar
Pierre Kraemer committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26

namespace CGoGN
{

namespace Algo
{

namespace MovingObjects
{

template <typename PFP>
class ParticleCell2DMemo : public ParticleCell2D<PFP>
{

David Cazier's avatar
David Cazier committed
27
28
public:
	typedef typename PFP::MAP MAP ;
Pierre Kraemer's avatar
Pierre Kraemer committed
29
	typedef typename PFP::VEC3 VEC3;
David Cazier's avatar
David Cazier committed
30
	typedef VertexAttribute<typename PFP::VEC3> TAB_POS ;
Pierre Kraemer's avatar
Pierre Kraemer committed
31
32


David Cazier's avatar
David Cazier committed
33
private:
pitiot's avatar
pitiot committed
34
	ParticleCell2DMemo(){
David Cazier's avatar
David Cazier committed
35
	}
Pierre Kraemer's avatar
Pierre Kraemer committed
36

David Cazier's avatar
David Cazier committed
37
public:
Pierre Kraemer's avatar
Pierre Kraemer committed
38

David Cazier's avatar
David Cazier committed
39
	ParticleCell2DMemo(MAP& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos) :
pitiot's avatar
pitiot committed
40
	ParticleCell2D<PFP>(map, belonging_cell, pos, tabPos)
David Cazier's avatar
David Cazier committed
41
	{
pitiot's avatar
pitiot committed
42

David Cazier's avatar
David Cazier committed
43
	}
Pierre Kraemer's avatar
Pierre Kraemer committed
44

pitiot's avatar
pitiot committed
45
	void vertexState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
46

pitiot's avatar
pitiot committed
47
	void edgeState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross, Geom::Orientation2D sideOfEdge = Geom::ALIGNED) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
48

pitiot's avatar
pitiot committed
49
	void faceState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
50

pitiot's avatar
pitiot committed
51
52
	void move(const VEC3& goal, CellMarkerMemo<FACE> * memo_cross) ;
	std::vector<Dart> get_memo(const VEC3& goal);
David Cazier's avatar
David Cazier committed
53
} ;
Pierre Kraemer's avatar
Pierre Kraemer committed
54
55
56
57
58
59
60
61
62
63

#include "particle_cell_2D_memo.hpp"

}

}

}

#endif