Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool Tree::serialize(ISerializer& inout, bool toread) {
- inout.InOut(this->currentMatrix);
- inout.InOut(this->modelMatrix);
- inout.InOut(this->level);
- inout.InOut(this->iamleaf);
- printMatrix(this->currentMatrix);
- printMatrix(this->modelMatrix);
- int size;
- if (toread == false) {
- size = this->descendants.size();
- }
- inout.InOut(size);
- cout << "size: "<<size<<endl;
- if (toread == false) {
- for (int i = 0; i < size; ++i) {
- this->descendants[i]->serialize(inout, toread);
- }
- }
- else {
- Tree * tmpTree = new Tree();
- for (int i = 0; i < size; ++i) {
- tmpTree->serialize(inout, toread);
- this->descendants.push_back(tmpTree);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement