Commit 7354a84f authored by Thomas Pitiot 's avatar Thomas Pitiot

working on particules

parent 981277ad
......@@ -39,14 +39,18 @@ public :
typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3;
typedef VertexAttribute<VEC3, MAP> TAB_POS;
typedef FaceAttribute<VEC3,MAP> TAB_FACE;
typedef VolumeAttribute<VEC3,MAP> TAB_VOL;
MAP& m;
const TAB_POS& position;
const TAB_FACE& face_center;
const TAB_VOL& volume_center;
VEC3 m_positionFace;
VEC3 m_positionVolume;
unsigned int crossCell ;
......@@ -54,13 +58,17 @@ public :
ParticleCell3D(MAP& map) : m(map)
{}
ParticleCell3D(MAP& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos) :
ParticleCell3D(MAP& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos,const TAB_FACE& fa_center = NULL,
const TAB_VOL& vol_center=NULL) :
Algo::MovingObjects::ParticleBase<PFP>(pos),
m(map),
position(tabPos),
d(belonging_cell)
{
m_positionFace = pointInFace(d);
if(vol_center) volume_center(vol_center);
if(fa_center) face_center(fa_center);
reset_positionFace();
reset_positionVolume();
this->setState(VOLUME);
}
......@@ -76,23 +84,13 @@ public :
d = cell;
}
inline VEC3 pointInFace(Dart d);
inline Geom::Orientation3D isLeftENextVertex(const VEC3& c, Dart d, const VEC3& base);
inline bool isRightVertex(const VEC3& c, Dart d, const VEC3& base);
inline Geom::Orientation3D whichSideOfFace(const VEC3& c, Dart d);
inline Geom::Orientation3D isLeftL1DVol(const VEC3& c, Dart d, const VEC3& base, const VEC3& top);
inline Geom::Orientation3D isRightDVol(const VEC3& c, Dart d, const VEC3& base, const VEC3& top);
inline Geom::Orientation3D isAbove(const VEC3& c, Dart d, const VEC3& top);
// inline int isLeftL1DFace(const VEC3& c, Dart d, const VEC3& base, const VEC3& normal);
// inline int isRightDFace(const VEC3& c, Dart d, const VEC3& base, const VEC3& normal);
inline Geom::Orientation3D whichSideOfPlanVolume(const VEC3& c, Dart d, const VEC3& base, const VEC3& top);
inline int whichSideOfPlan(const VEC3& c, Dart d, const VEC3& base, const VEC3& normal); // orientation par rapport au plan de gauche de l'arete visée
......@@ -114,9 +112,10 @@ public :
void volumeState(const VEC3& current);
void volumeSpecialCase(const VEC3& current);
void placeOnRightFaceAndRightEdge(const VEC3& current,bool * casON, bool * enDessous);
void reset_positionFace();
void reset_positionVolume();
void move(const VEC3& newCurrent)
{
......
......@@ -52,8 +52,6 @@ public :
void volumeState(const VEC3& current, CellMarkerMemo<MAP, VOLUME>& memo_cross);
void volumeSpecialCase(const VEC3& current, CellMarkerMemo<MAP, VOLUME>& memo_cross);
std::vector<Dart> move(const VEC3& newCurrent, CellMarkerMemo<MAP, VOLUME>& memo_cross);
std::vector<Dart> move(const VEC3& newCurrent);
......
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