ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/visitors/ZconsVisitor.hpp
Revision: 1911
Committed: Mon Jan 10 18:05:45 2005 UTC (19 years, 5 months ago) by tim
File size: 1274 byte(s)
Log Message:
more work in zconstraint

File Contents

# Content
1 #ifndef VISITORS_ZCONSVISITOR_HPP
2 #define VISITORS_ZCONSVISITOR_HPP
3
4 #include "io/ZConsReader.hpp"
5 #include "primitives/RigidBody.hpp"
6 #include "visitors/BaseVisitor.hpp"
7 #include "visitors/AtomData.hpp"
8
9
10
11 namespace oopse {
12
13 /**
14 * @class ZConsVisitor
15 * @note
16 */
17 class ZConsVisitor : public BaseVisitor{
18 public:
19 enum ZConsState{zsFixed = 0, zsMoving};
20
21 ZConsVisitor(SimInfo* info);
22 ~ZConsVisitor();
23
24 virtual void visit(Atom* atom);
25 virtual void visit(DirectionalAtom* datom);
26 virtual void visit(RigidBody* rb);
27
28 virtual void update();
29
30 bool haveZconsMol() {return zmolStates_.empty(); }
31
32 virtual const std::string toString();
33 protected:
34 void internalVisit(StuntDouble* sd, const std::string& prefix);
35 bool isZconstraint(int index, std::string& prefix);
36 void readZconsFile(double time);
37
38 private:
39 std::vector<double> zconsPos;
40 std::map<int, ZConsState> zmolStates_;
41 double zconsTol_;
42 double zconsTime_;
43 std::string zconsFilename_;
44 ZConsReader* zconsReader_;
45 SimInfo* info_;
46 Snapshot* currSnapshot_;
47 std::map<int, int> zatomToZmol_;
48 };
49
50 }//namespace oopse
51 #endif // _ZCONS_VISITOR_H_
52
53

Properties

Name Value
svn:executable *