Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Simox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
Simox
Commits
ee25d70c
Commit
ee25d70c
authored
6 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Added optional childclass in addBody()
parent
c2311ae5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
VirtualRobot/MJCF/elements/body.cpp
+5
-1
5 additions, 1 deletion
VirtualRobot/MJCF/elements/body.cpp
VirtualRobot/MJCF/elements/body.h
+1
-1
1 addition, 1 deletion
VirtualRobot/MJCF/elements/body.h
with
6 additions
and
2 deletions
VirtualRobot/MJCF/elements/body.cpp
+
5
−
1
View file @
ee25d70c
...
...
@@ -145,7 +145,7 @@ Body Worldbody::addMocapBody(const std::string& name, float geomSize)
return
mocap
;
}
Body
Worldbody
::
addBody
(
const
std
::
string
&
name
)
Body
Worldbody
::
addBody
(
const
std
::
string
&
name
,
const
std
::
string
&
childClass
)
{
Body
body
=
addChild
<
Body
>
();
...
...
@@ -153,6 +153,10 @@ Body Worldbody::addBody(const std::string& name)
{
body
.
name
=
name
;
}
if
(
!
childClass
.
empty
())
{
body
.
childclass
=
childClass
;
}
return
body
;
}
This diff is collapsed.
Click to expand it.
VirtualRobot/MJCF/elements/body.h
+
1
−
1
View file @
ee25d70c
...
...
@@ -222,7 +222,7 @@ struct Worldbody : public Element<Worldbody>
mjcf_ElementDerivedConstructors
(
Worldbody
)
/// Add a body element.
Body
addBody
(
const
std
::
string
&
name
=
""
);
Body
addBody
(
const
std
::
string
&
name
=
""
,
const
std
::
string
&
childClass
=
""
);
/// Add a mocap body with the given name to the worldbody.
Body
addMocapBody
(
const
std
::
string
&
name
,
float
geomSize
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment