37 |
|
|
38 |
|
#include "primitives/StuntDouble.hpp" |
39 |
|
#include "primitives/DirectionalAtom.hpp" |
40 |
+ |
#include "types/AtomStamp.hpp" |
41 |
|
namespace oopse{ |
42 |
|
class RigidBody : public StuntDouble { |
43 |
|
public: |
52 |
|
/** |
53 |
|
* Sets the current rotation matrix of this stuntdouble |
54 |
|
* @param a new rotation matrix |
55 |
+ |
* @note setA will not change the position and rotation matrix of Directional atoms belong to |
56 |
+ |
* this rigidbody. If you want to do that, use #updateAtoms |
57 |
|
*/ |
58 |
|
virtual void setA(const RotMat3x3d& a); |
59 |
|
/** |
72 |
|
|
73 |
|
|
74 |
|
/** Sets the internal unit frame of this stuntdouble by three euler angles */ |
75 |
< |
void setUnitFrameFromEuler(double phi, double theta, double psi); |
75 |
> |
void setElectroFrameFromEuler(double phi, double theta, double psi); |
76 |
|
|
77 |
|
/** |
78 |
|
* Returns the gradient of this stuntdouble |
83 |
|
|
84 |
|
virtual void accept(BaseVisitor* v); |
85 |
|
|
86 |
< |
void addAtom(Atom* atom); |
86 |
> |
void addAtom(Atom* at, AtomStamp* ats); |
87 |
|
|
88 |
|
/** calculate the reference coordinates */ |
89 |
|
void calcRefCoords(); |
94 |
|
/** update the positions of atoms belong to this rigidbody */ |
95 |
|
void updateAtoms(); |
96 |
|
|
97 |
+ |
Atom* beginAtom(std::vector<Atom*>::iterator& i); |
98 |
+ |
|
99 |
+ |
Atom* nextAtom(std::vector<Atom*>::iterator& i); |
100 |
+ |
|
101 |
+ |
std::vector<Atom*>::iterator getBeginAtomIter() { |
102 |
+ |
return atoms_.begin(); |
103 |
+ |
} |
104 |
+ |
|
105 |
+ |
std::vector<Atom*>::iterator getEndAtomIter() { |
106 |
+ |
return atoms_.end(); |
107 |
+ |
} |
108 |
+ |
|
109 |
|
/** |
110 |
|
* Returns the atoms of this rigid body |
111 |
|
* @return the atoms of this rigid body in a vector |
112 |
+ |
* @deprecate |
113 |
|
*/ |
114 |
|
std::vector<Atom*> getAtoms() { |
115 |
|
return atoms_; |
178 |
|
|
179 |
|
std::vector<Atom*> atoms_; |
180 |
|
std::vector<Vector3d> refCoords_; |
181 |
+ |
std::vector<RotMat3x3d> refOrients_; |
182 |
|
}; |
183 |
|
|
184 |
|
}//namepace oopse |