Skip to content

Commit

Permalink
Add vector with ids of links added in a model
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Perez <[email protected]>
  • Loading branch information
Blast545 committed Nov 24, 2020
1 parent 7fbd746 commit 37ab82d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bullet/src/Base.hh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ struct ModelInfo
{
std::string name;
Identity world;
std::vector<std::size_t> links = {};
};

struct LinkInfo
Expand Down Expand Up @@ -130,6 +131,9 @@ class Base : public Implements3d<FeatureList<Feature>>
const auto id = this->GetNextEntity();
this->links[id] = std::make_shared<LinkInfo>(_linkInfo);

auto model = this->models.at(_linkInfo.model);
model->links.push_back(id);

return this->GenerateIdentity(id, this->links.at(id));
}

Expand Down

0 comments on commit 37ab82d

Please sign in to comment.