39 |
|
|
40 |
|
using namespace oopse; |
41 |
|
|
42 |
– |
|
43 |
– |
|
44 |
– |
//forward declaration |
45 |
– |
class Snapshot; |
46 |
– |
class StuntDouble; |
47 |
– |
class DataStorageTestCase; |
42 |
|
/** |
43 |
|
* @class DataStorage |
44 |
|
* @warning do not try to insert element into (or ease element from) private member data |
91 |
|
void setStorageLayout(int layout); |
92 |
|
/** Returns the pointer of internal array */ |
93 |
|
double *getArrayPointer(int whichArray); |
100 |
– |
friend class StuntDouble; |
101 |
– |
friend class DataStorageTestCase; |
102 |
– |
private: |
94 |
|
|
95 |
+ |
std::vector<Vector3d> position; /** position array */ |
96 |
+ |
std::vector<Vector3d> velocity; /** velocity array */ |
97 |
+ |
std::vector<RotMat3x3d> aMat; /** rotation matrix array */ |
98 |
+ |
std::vector<Vector3d> angularMomentum;/** angular momentum array (body-fixed) */ |
99 |
+ |
std::vector<Vector3d> unitVector; /** the lab frame unit std::vector array*/ |
100 |
+ |
std::vector<double> zAngle; /** z -angle array */ |
101 |
+ |
std::vector<Vector3d> force; /** force array */ |
102 |
+ |
std::vector<Vector3d> torque; /** torque array */ |
103 |
|
|
104 |
+ |
private: |
105 |
+ |
|
106 |
|
double* internalGetArrayPointer(std::vector<Vector3d>& v); |
107 |
|
|
108 |
|
double* internalGetArrayPointer(std::vector<RotMat3x3d>& v); |
116 |
|
|
117 |
|
int size_; |
118 |
|
int storageLayout_; |
119 |
< |
std::vector<Vector3d> position; /** position array */ |
119 |
< |
std::vector<Vector3d> velocity; /** velocity array */ |
120 |
< |
std::vector<RotMat3x3d> aMat; /** rotation matrix array */ |
121 |
< |
std::vector<Vector3d> angularMomentum;/** angular momentum array (body-fixed) */ |
122 |
< |
std::vector<Vector3d> unitVector; /** the lab frame unit std::vector array*/ |
123 |
< |
std::vector<double> zAngle; /** z -angle array */ |
124 |
< |
std::vector<Vector3d> force; /** force array */ |
125 |
< |
std::vector<Vector3d> torque; /** torque array */ |
119 |
> |
|
120 |
|
}; |
121 |
|
|
122 |
|
|