1 |
gezelter |
2 |
#ifndef _ZCONS_VISITOR_H_ |
2 |
|
|
#define _ZCONS_VISITOR_H_ |
3 |
|
|
|
4 |
tim |
3 |
#include "visitors/BaseVisitor.hpp" |
5 |
|
|
#include "io/ZConsReader.hpp" |
6 |
tim |
132 |
#include "visitors/AtomData.hpp" |
7 |
|
|
#include "constraints/ZconsData.hpp" |
8 |
gezelter |
2 |
enum ZConsState{zsFixed, zsMoving}; |
9 |
tim |
132 |
namespace oopse { |
10 |
|
|
|
11 |
gezelter |
2 |
class ZConsVisitor : public BaseVisitor{ |
12 |
|
|
public: |
13 |
|
|
|
14 |
|
|
|
15 |
|
|
ZConsVisitor(SimInfo* info); |
16 |
|
|
~ZConsVisitor(); |
17 |
|
|
|
18 |
|
|
virtual void visit(Atom* atom); |
19 |
|
|
virtual void visit(DirectionalAtom* datom); |
20 |
|
|
virtual void visit(RigidBody* rb); |
21 |
|
|
|
22 |
|
|
virtual void update(); |
23 |
|
|
|
24 |
|
|
bool haveZconsMol() {return haveZcons;} |
25 |
|
|
|
26 |
|
|
virtual const string toString(); |
27 |
|
|
protected: |
28 |
|
|
void internalVisit(StuntDouble* sd, const string& prefix); |
29 |
|
|
bool isZconstraint(int index, string& prefix); |
30 |
|
|
Molecule* findZconsMol(int index); |
31 |
|
|
void getZconsPos(double time); |
32 |
|
|
|
33 |
|
|
private: |
34 |
|
|
vector<Molecule*> zconsMol; |
35 |
|
|
vector<double> zconsPos; |
36 |
|
|
map<int, ZConsState> zconsState; |
37 |
|
|
bool haveZcons; |
38 |
|
|
double zconsTol; |
39 |
|
|
double zconsTime; |
40 |
|
|
string zconsFilename; |
41 |
|
|
ZConsReader* zconsReader; |
42 |
|
|
SimInfo* info; |
43 |
|
|
}; |
44 |
tim |
132 |
|
45 |
|
|
}//namespace oopse |
46 |
gezelter |
2 |
#endif // _ZCONS_VISITOR_H_ |
47 |
|
|
|
48 |
tim |
132 |
|