| 1 |
< |
/* |
| 1 |
> |
/* |
| 2 |
|
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
| 3 |
|
* |
| 4 |
|
* The University of Notre Dame grants you ("Licensee") a |
| 51 |
|
|
| 52 |
|
namespace oopse { |
| 53 |
|
|
| 54 |
< |
/** |
| 55 |
< |
* @class ZConsVisitor |
| 56 |
< |
* @note |
| 57 |
< |
*/ |
| 58 |
< |
class ZConsVisitor : public BaseVisitor{ |
| 59 |
< |
public: |
| 60 |
< |
enum ZConsState{zsFixed = 0, zsMoving}; |
| 54 |
> |
/** |
| 55 |
> |
* @class ZConsVisitor |
| 56 |
> |
* @note |
| 57 |
> |
*/ |
| 58 |
> |
class ZConsVisitor : public BaseVisitor{ |
| 59 |
> |
public: |
| 60 |
> |
enum ZConsState{zsFixed = 0, zsMoving}; |
| 61 |
|
|
| 62 |
< |
ZConsVisitor(SimInfo* info); |
| 63 |
< |
~ZConsVisitor(); |
| 62 |
> |
ZConsVisitor(SimInfo* info); |
| 63 |
> |
~ZConsVisitor(); |
| 64 |
|
|
| 65 |
< |
virtual void visit(Atom* atom); |
| 66 |
< |
virtual void visit(DirectionalAtom* datom); |
| 67 |
< |
virtual void visit(RigidBody* rb); |
| 65 |
> |
virtual void visit(Atom* atom); |
| 66 |
> |
virtual void visit(DirectionalAtom* datom); |
| 67 |
> |
virtual void visit(RigidBody* rb); |
| 68 |
|
|
| 69 |
< |
virtual void update(); |
| 69 |
> |
virtual void update(); |
| 70 |
|
|
| 71 |
< |
bool haveZconsMol() {return !zmolStates_.empty(); } |
| 71 |
> |
bool haveZconsMol() {return !zmolStates_.empty(); } |
| 72 |
|
|
| 73 |
< |
virtual const std::string toString(); |
| 74 |
< |
protected: |
| 75 |
< |
void internalVisit(StuntDouble* sd, const std::string& prefix); |
| 76 |
< |
bool isZconstraint(int index, std::string& prefix); |
| 77 |
< |
void readZconsFile(double time); |
| 73 |
> |
virtual const std::string toString(); |
| 74 |
> |
protected: |
| 75 |
> |
void internalVisit(StuntDouble* sd, const std::string& prefix); |
| 76 |
> |
bool isZconstraint(int index, std::string& prefix); |
| 77 |
> |
void readZconsFile(RealType time); |
| 78 |
|
|
| 79 |
< |
private: |
| 80 |
< |
std::vector<double> zconsPos; |
| 81 |
< |
std::map<int, ZConsState> zmolStates_; |
| 82 |
< |
double zconsTol_; |
| 83 |
< |
double zconsTime_; |
| 84 |
< |
std::string zconsFilename_; |
| 85 |
< |
ZConsReader* zconsReader_; |
| 86 |
< |
SimInfo* info_; |
| 87 |
< |
Snapshot* currSnapshot_; |
| 88 |
< |
std::map<int, int> zatomToZmol_; |
| 89 |
< |
}; |
| 79 |
> |
private: |
| 80 |
> |
std::vector<RealType> zconsPos; |
| 81 |
> |
std::map<int, ZConsState> zmolStates_; |
| 82 |
> |
RealType zconsTol_; |
| 83 |
> |
RealType zconsTime_; |
| 84 |
> |
std::string zconsFilename_; |
| 85 |
> |
ZConsReader* zconsReader_; |
| 86 |
> |
SimInfo* info_; |
| 87 |
> |
Snapshot* currSnapshot_; |
| 88 |
> |
std::map<int, int> zatomToZmol_; |
| 89 |
> |
}; |
| 90 |
|
|
| 91 |
|
}//namespace oopse |
| 92 |
|
#endif // _ZCONS_VISITOR_H_ |