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 |
|
|
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]); |
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]); |
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 |