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 1097 by gezelter, Mon Apr 12 20:32:20 2004 UTC vs.
Revision 1234 by tim, Fri Jun 4 03:15:31 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   class StuntDouble {
15   public:
16 +  virtual ~StuntDouble();
17    
18    int getObjType();
19    
# Line 43 | Line 50 | class StuntDouble {
50    virtual void   getJ(double j[3]);
51    virtual void   setJ(double j[3]);
52  
53 +  virtual void getQ( double q[4] ); // get the quanternions
54 +  virtual void setQ( double q[4] );
55 +
56 +  virtual void setType(char* type) = 0;
57 +  virtual char* getType() = 0;
58 +  
59 +
60    virtual void   getTrq(double trq[3]);
61    virtual void   addTrq(double trq[3]);
62  
# Line 53 | Line 67 | class StuntDouble {
67    virtual void   setEuler(double phi, double theta, double psi);
68    virtual void   getEulerAngles(double eulers[3]);
69  
70 +  virtual bool isLinear() {return false;}
71 +  virtual int linearAxis() {return -1;}
72 +
73 +  virtual double   getZangle();
74 +  virtual void   setZangle(double zAngle);
75 +  virtual void   addZangle(double zAngle);
76 +
77 +  virtual void accept(BaseVisitor* v) = 0;
78 +
79 +  void addProperty(GenericData* data);
80 +  void removeProperty(const string& propName);
81 +  GenericData* getProperty(const string& propName);
82 +  
83   protected:
84    StuntDouble(){}
85 +
86 +  //prevent default copy constructor copy information from properties which will cause problem
87 +  StuntDouble(const StuntDouble& sd){
88 +    objType = sd.objType;
89 +  }
90 +  
91    int objType;
92 +
93 +  map<string, GenericData*> properties;
94   };
95  
96   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines