Cherry-pick support for nested canonical links to sdf10 #350
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-pick #341 to sdf10; use rebase and merge.
Support implicit nested canonical links (#341)
Allow models without links if they have nested models instead.
When building FrameAttachedToGraph, if model has no links
choose the first link of the first nested model as canonical
link instead.
A new private function
Model::CanonicalLinkAndRelativeName
is added that provides a
Link*
pointer to the canonical link and itsnested name relative to the current model, which is needed
in the FrameAttachedToGraph. This private prevents
duplicate code in
FrameSemantics.cc
andModel::CanonicalLink
.The method is private to hide :: syntax from libsdformat9,
at least until there is a compelling reason to make the API
public.
A helper function is added to FrameSemantics.cc as a friend
of Model so that buildFrameAttachedToGraph can call the
private API. That function can't be added directly
as a friend since it uses a
FrameAttachedToGraph&
as an argument, which isn't defined in Model.hh.
Signed-off-by: Steve Peters [email protected]