25 |
|
|
26 |
|
namespace oopse { |
27 |
|
|
28 |
< |
SimSnapshotManager::SimSnapshotManager(){ |
28 |
> |
SimSnapshotManager::SimSnapshotManager(SimInfo* info) : info_(info){ |
29 |
> |
int nAtoms = info_->getNAtoms(); |
30 |
> |
int nRigidBodies = info_->getNRigidBodies(); |
31 |
> |
|
32 |
|
//allocate memory for snapshots |
33 |
< |
previousSnapshot_ = new Snapshot(); |
34 |
< |
currentSnapshot_ = new Snapshot(); |
33 |
> |
previousSnapshot_ = new Snapshot(nAtoms, nRigidBodies); |
34 |
> |
currentSnapshot_ = new Snapshot(nAtoms, nRigidBodies); |
35 |
|
} |
36 |
|
|
37 |
|
bool SimSnapshotManager::advance() { |