48 |
|
#include "visitors/BaseVisitor.hpp" |
49 |
|
#include "primitives/StuntDouble.hpp" |
50 |
|
#include "visitors/AtomData.hpp" |
51 |
+ |
#include "selection/SelectionManager.hpp" |
52 |
+ |
#include "selection/SelectionEvaluator.hpp" |
53 |
|
|
52 |
– |
|
54 |
|
namespace oopse { |
55 |
|
|
56 |
|
class SimInfo; |
57 |
|
|
57 |
– |
//IgnoreVisitor will turn on the ignoring flag of the stuntdouble |
58 |
– |
class IgnoreVisitor : public BaseVisitor{ |
59 |
– |
public: |
60 |
– |
IgnoreVisitor(SimInfo* info) : BaseVisitor() {this->info = info; visitorName = "IgnoreVisitor";} |
58 |
|
|
62 |
– |
virtual void visit(Atom* atom); |
63 |
– |
virtual void visit(DirectionalAtom* datom); |
64 |
– |
virtual void visit(RigidBody* rb); |
65 |
– |
|
66 |
– |
virtual const std::string toString(); |
67 |
– |
|
68 |
– |
void addIgnoreType(const std::string& type) {itList.insert(type);} |
69 |
– |
|
70 |
– |
protected: |
71 |
– |
bool isIgnoreType(const std::string& name); |
72 |
– |
void internalVisit(StuntDouble* sd); |
73 |
– |
std::set<std::string> itList; //ignore type list; |
74 |
– |
SimInfo* info; |
75 |
– |
}; |
76 |
– |
|
77 |
– |
|
59 |
|
class WrappingVisitor : public BaseVisitor{ |
60 |
|
public: |
61 |
|
WrappingVisitor(SimInfo* info) : BaseVisitor() { |
94 |
|
|
95 |
|
class XYZVisitor : public BaseVisitor{ |
96 |
|
public: |
116 |
– |
XYZVisitor(SimInfo* info, bool printDipole = true); |
97 |
|
|
98 |
+ |
XYZVisitor(SimInfo* info); |
99 |
+ |
|
100 |
+ |
XYZVisitor(SimInfo* info, const std::string& script); |
101 |
+ |
|
102 |
|
virtual void visit(Atom* atom); |
103 |
|
virtual void visit(DirectionalAtom* datom); |
104 |
|
virtual void visit(RigidBody* rb); |
105 |
|
|
106 |
+ |
virtual void update(); |
107 |
+ |
|
108 |
|
virtual const std::string toString(); |
109 |
|
|
110 |
|
void writeFrame(std::ostream& outStream); |
116 |
|
|
117 |
|
private: |
118 |
|
SimInfo* info; |
119 |
+ |
SelectionManager seleMan; |
120 |
+ |
SelectionEvaluator evaluator; |
121 |
|
std::vector<std::string> frame; |
122 |
< |
bool printDipole; |
122 |
> |
|
123 |
|
}; |
124 |
|
|
125 |
|
|