particle_cell_2DandHalf_memo.h 1.63 KB
Newer Older
pitiot's avatar
pitiot committed
1 2 3
#ifndef PARTCELL2DANDHALFMEMO_H
#define PARTCELL2DANDHALFMEMO_H

Pierre Kraemer's avatar
Pierre Kraemer committed
4
#include "Algo/MovingObjects/particle_cell_2DandHalf.h"
pitiot's avatar
pitiot committed
5 6 7 8

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

pitiot's avatar
pitiot committed
10 11 12 13 14 15 16 17 18 19 20
#include <iostream>

/* A particle cell is a particle base within a map, within a precise cell, the displacement function should indicate
   after each displacement wherein lies the new position of the particle */

namespace CGoGN
{

namespace Algo
{

21 22 23
namespace Surface
{

pitiot's avatar
pitiot committed
24 25 26 27 28 29
namespace MovingObjects
{

template <typename PFP>
class ParticleCell2DAndHalfMemo : public ParticleCell2DAndHalf<PFP>
{
Pierre Kraemer's avatar
Pierre Kraemer committed
30 31
public :
	typedef typename PFP::MAP MAP;
pitiot's avatar
pitiot committed
32
	typedef typename PFP::VEC3 VEC3;
33
	typedef VertexAttribute<VEC3, MAP> TAB_POS;
pitiot's avatar
pitiot committed
34

35 36 37
//	bool detect_vertex;
//	bool detect_edge;
//	bool detect_face;
pitiot's avatar
pitiot committed
38 39
	ParticleCell2DAndHalfMemo() {};

Pierre Kraemer's avatar
Pierre Kraemer committed
40
	ParticleCell2DAndHalfMemo(MAP& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos) :
41 42
		ParticleCell2DAndHalf<PFP>(map,belonging_cell,pos,tabPos)
//		detect_vertex(false),detect_edge(false),detect_face(true)
pitiot's avatar
pitiot committed
43 44 45 46
	{
//	 memo_cross.push_back(this->d);
	};

Pierre Kraemer's avatar
Pierre Kraemer committed
47 48 49
	void vertexState(VEC3 current, CellMarkerMemo<MAP, FACE>& memo_cross);

	void edgeState(VEC3 current, CellMarkerMemo<MAP, FACE>& memo_cross, Geom::Orientation3D sideOfEdge=Geom::ON);
pitiot's avatar
pitiot committed
50

Pierre Kraemer's avatar
Pierre Kraemer committed
51
	void faceState(VEC3 current, CellMarkerMemo<MAP, FACE>& memo_cross);
pitiot's avatar
pitiot committed
52

Pierre Kraemer's avatar
Pierre Kraemer committed
53
	std::vector<Dart> move(const VEC3& newCurrent, CellMarkerMemo<MAP, FACE>& memo_cross);
pitiot's avatar
pitiot committed
54

55
	std::vector<Dart> move(const VEC3& newCurrent);
pitiot's avatar
pitiot committed
56 57
};

Pierre Kraemer's avatar
Pierre Kraemer committed
58 59 60 61 62
} // namespace MovingObjects

} // namespace Surface

} // namespace Algo
pitiot's avatar
pitiot committed
63

Pierre Kraemer's avatar
Pierre Kraemer committed
64
} // namespace CGoGN
65

Pierre Kraemer's avatar
Pierre Kraemer committed
66
#include "Algo/MovingObjects/particle_cell_2DandHalf_memo.hpp"
pitiot's avatar
pitiot committed
67 68

#endif