75 |
|
storageLayout_ |= DataStorage::dslAngularMomentum; |
76 |
|
} |
77 |
|
} |
78 |
+ |
if(nRigidBodies > 0 && storageLayout_ & DataStorage::dslVelocity) { |
79 |
+ |
storageLayout_ |= DataStorage::dslAngularMomentum; |
80 |
+ |
} |
81 |
|
|
82 |
|
bsMan_ = new BlockSnapshotManager(info, dumpFilename_, storageLayout_); |
83 |
|
info_->setSnapshotManager(bsMan_); |
139 |
|
|
140 |
|
for (int i = 0; i < nblocks; ++i) { |
141 |
|
bsMan_->loadBlock(i); |
142 |
+ |
|
143 |
|
for (int j = i; j < nblocks; ++j) { |
144 |
|
bsMan_->loadBlock(j); |
145 |
|
correlateBlocks(i, j); |
146 |
< |
|
143 |
< |
if (i != j) { |
144 |
< |
//if i equals to j, the block is still used, should not unload it |
145 |
< |
bsMan_->unloadBlock(j); |
146 |
< |
} |
146 |
> |
bsMan_->unloadBlock(j); |
147 |
|
} |
148 |
+ |
|
149 |
|
bsMan_->unloadBlock(i); |
150 |
|
} |
151 |
|
|