| 57 |
|
namespace oopse{ |
| 58 |
|
class RigidBody : public StuntDouble { |
| 59 |
|
public: |
| 60 |
+ |
|
| 61 |
+ |
typedef std::vector<Atom*>::iterator AtomIterator; |
| 62 |
+ |
|
| 63 |
|
RigidBody(); |
| 64 |
|
|
| 65 |
|
virtual std::string getType() { return name_;} |
| 119 |
|
/** update the positions of atoms belong to this rigidbody */ |
| 120 |
|
void updateAtoms(); |
| 121 |
|
|
| 122 |
< |
Atom* beginAtom(std::vector<Atom*>::iterator& i); |
| 122 |
> |
void updateAtoms(int frame); |
| 123 |
|
|
| 124 |
< |
Atom* nextAtom(std::vector<Atom*>::iterator& i); |
| 124 |
> |
void updateAtomVel(); |
| 125 |
|
|
| 126 |
+ |
void updateAtomVel(int frame); |
| 127 |
+ |
|
| 128 |
+ |
Atom* beginAtom(std::vector<Atom*>::iterator& i) { |
| 129 |
+ |
i = atoms_.begin(); |
| 130 |
+ |
return i != atoms_.end() ? *i : NULL; |
| 131 |
+ |
} |
| 132 |
+ |
|
| 133 |
+ |
Atom* nextAtom(std::vector<Atom*>::iterator& i) { |
| 134 |
+ |
++i; |
| 135 |
+ |
return i != atoms_.end() ? *i : NULL; |
| 136 |
+ |
} |
| 137 |
+ |
|
| 138 |
|
std::vector<Atom*>::iterator getBeginAtomIter() { |
| 139 |
|
return atoms_.begin(); |
| 140 |
|
} |