| 26 |
|
public: |
| 27 |
|
|
| 28 |
|
RigidBody(); |
| 29 |
+ |
//RigidBody(const RigidBody& rb); |
| 30 |
+ |
|
| 31 |
|
virtual ~RigidBody(); |
| 32 |
|
|
| 33 |
|
void addAtom(Atom* at, AtomStamp* ats); |
| 41 |
|
void getFrc( double theF[3] ); |
| 42 |
|
void addFrc( double theF[3] ); |
| 43 |
|
void zeroForces(); |
| 44 |
+ |
|
| 45 |
+ |
virtual bool isLinear() {return is_linear;} |
| 46 |
+ |
virtual int linearAxis() {return linear_axis;} |
| 47 |
|
|
| 48 |
|
double getMass( void ) { return mass; } |
| 49 |
|
|
| 50 |
|
void printAmatIndex( void ); |
| 51 |
< |
void setEulerAngles( double phi, double theta, double psi ); |
| 51 |
> |
void setEuler( double phi, double theta, double psi ); |
| 52 |
|
void getQ( double the_q[4] ); // get the quanternions |
| 53 |
|
void setQ( double the_q[4] ); |
| 54 |
|
|
| 68 |
|
void lab2Body( double r[3] ); |
| 69 |
|
void body2Lab( double r[3] ); |
| 70 |
|
|
| 71 |
+ |
double getZangle( ); |
| 72 |
+ |
void setZangle( double zAng ); |
| 73 |
+ |
void addZangle( double zAng ); |
| 74 |
+ |
|
| 75 |
|
void calcRefCoords( void ); |
| 76 |
|
void doEulerToRotMat(vec3 &euler, mat3x3 &myA ); |
| 77 |
|
void calcForcesAndTorques( void ); |
| 92 |
|
// utility routines |
| 93 |
|
|
| 94 |
|
void findCOM( void ); |
| 95 |
< |
void findOrient( void ); |
| 96 |
< |
|
| 95 |
> |
|
| 96 |
> |
virtual void accept(BaseVisitor* v); |
| 97 |
> |
|
| 98 |
> |
vector<Atom*> getAtoms() { return myAtoms;} |
| 99 |
> |
int getNumAtoms() {return myAtoms.size();} |
| 100 |
> |
|
| 101 |
> |
void getAtomPos(double theP[3], int index); |
| 102 |
|
protected: |
| 103 |
|
|
| 104 |
|
double mass; // the total mass |
| 110 |
|
double A[3][3]; // the rotation matrix |
| 111 |
|
double I[3][3]; // the inertial tensor (body fixed) |
| 112 |
|
double sU[3][3]; // the standard unit vectors (body fixed) |
| 113 |
+ |
double zAngle; // the rotation about the z-axis (body fixed) |
| 114 |
|
|
| 115 |
+ |
bool is_linear; |
| 116 |
+ |
int linear_axis; |
| 117 |
+ |
double momIntTol; |
| 118 |
+ |
|
| 119 |
|
vector<Atom*> myAtoms; // the vector of atoms |
| 120 |
|
vector<vec3> refCoords; |
| 121 |
|
vector<mat3x3> refOrients; |
| 122 |
|
|
| 104 |
– |
bool com_good; |
| 105 |
– |
bool forces_good; |
| 106 |
– |
bool precalc_done; |
| 107 |
– |
bool orient_good; |
| 108 |
– |
|
| 123 |
|
char rbName[100]; //it will eventually be converted into string |
| 124 |
|
}; |
| 125 |
|
|