ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/StuntDouble.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/StuntDouble.hpp (file contents):
Revision 1108 by tim, Wed Apr 14 15:37:41 2004 UTC vs.
Revision 1452 by tim, Mon Aug 23 15:11:36 2004 UTC

# Line 1 | Line 1
1   #ifndef __STUNTDOUBLE_HPP__
2   #define __STUNTDOUBLE_HPP__
3  
4 + #include <map>
5 + #include "GenericData.hpp"
6 +
7   #define OT_ATOM 0
8   #define OT_DATOM 1
9   #define OT_RIGIDBODY 2
10  
11 + using namespace std;
12 + class BaseVisitor;
13 +
14 +
15 + enum StorageMethod {smRotation, smQuaternion};
16 +
17   class StuntDouble {
18   public:
19 +  virtual ~StuntDouble();
20    
21    int getObjType();
22    
# Line 35 | Line 45 | class StuntDouble {
45    virtual void   setVel(double vel[3]);
46    
47    virtual void   getFrc(double frc[3]);
48 +  virtual void setFrc(double frc[3]);
49    virtual void   addFrc(double frc[3]);
50  
51    virtual void   getA(double A[3][3]);
# Line 51 | Line 62 | class StuntDouble {
62    
63  
64    virtual void   getTrq(double trq[3]);
65 +  virtual void   setTrq(double trq[3]);  
66    virtual void   addTrq(double trq[3]);
67  
68    virtual void   getI(double I[3][3]);
# Line 60 | Line 72 | class StuntDouble {
72    virtual void   setEuler(double phi, double theta, double psi);
73    virtual void   getEulerAngles(double eulers[3]);
74  
75 +  virtual bool isLinear() {return false;}
76 +  virtual int linearAxis() {return -1;}
77 +
78 +  virtual double   getZangle();
79 +  virtual void   setZangle(double zAngle);
80 +  virtual void   addZangle(double zAngle);
81 +
82 +  virtual void accept(BaseVisitor* v) = 0;
83 +
84 +  void addProperty(GenericData* data);
85 +  void removeProperty(const string& propName);
86 +  GenericData* getProperty(const string& propName);
87 +
88 +  StorageMethod getStorageMethd(){return stMethod;}
89 +  void setStorageMethod(StorageMethod method) {stMethod = method;}
90 +  
91   protected:
92    StuntDouble(){}
93 +
94 +  //prevent default copy constructor copy information from properties which will cause problem
95 +  StuntDouble(const StuntDouble& sd){
96 +    objType = sd.objType;
97 +  }
98 +  
99    int objType;
100 +
101 +  map<string, GenericData*> properties;
102 +
103 +  StorageMethod stMethod;
104 +  //static int numGetQ = 0;
105 +  //static int numGetA = 0;
106   };
107  
108   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines