66 int atomStorageLayout,
int rigidBodyStorageLayout,
67 int cutoffGroupStorageLayout,
long long int memSize,
68 int blockCapacity = 2);
71 virtual Snapshot* getSnapshot(
int id);
76 SnapshotBlock getSnapshotBlock(
int block) {
return blocks_.at(block); }
78 int getNActiveBlocks();
80 void needCOMprops(
bool ncp);
82 bool isBlockActive(
int block) {
83 return findActiveBlock(block) != activeBlocks_.end() ? true :
false;
86 bool loadBlock(
int block);
88 bool unloadBlock(
int block);
90 std::vector<int> getActiveBlocks();
92 int getBlockCapacity() {
return blockCapacity_; }
97 std::vector<int>::iterator findActiveBlock(
int block) {
98 return std::find(activeBlocks_.begin(), activeBlocks_.end(), block);
101 bool hasZeroRefBlock();
103 int getFirstZeroRefBlock();
105 void internalLoad(
int block);
106 void internalUnload(
int block);
107 Snapshot* loadFrame(
int frame);
110 long long int memSize_;
112 std::vector<Snapshot*> snapshots_;
113 std::vector<SnapshotBlock> blocks_;
114 std::vector<int> activeBlocks_;
115 std::vector<int> activeRefCount_;
124 int nSnapshotPerBlock_;