Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gepetto-viewer-corba
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gepetto
gepetto-viewer-corba
Commits
e3e1bb8a
Commit
e3e1bb8a
authored
9 years ago
by
Joseph Mirabel
Committed by
Florent Lamiraux
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Enhance findings of Node by name.
parent
06a83090
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/gepetto/viewer/corba/windows-manager.h
+1
-0
1 addition, 0 deletions
include/gepetto/viewer/corba/windows-manager.h
src/windows-manager.cpp
+19
-2
19 additions, 2 deletions
src/windows-manager.cpp
with
20 additions
and
2 deletions
include/gepetto/viewer/corba/windows-manager.h
+
1
−
0
View file @
e3e1bb8a
...
...
@@ -57,6 +57,7 @@ namespace graphics {
static
VisibilityMode
getVisibility
(
const
std
::
string
&
visibilityName
);
static
WireFrameMode
getWire
(
const
std
::
string
&
wireName
);
static
LightingMode
getLight
(
const
std
::
string
&
lightName
);
NodePtr_t
find
(
const
std
::
string
name
,
GroupNodePtr_t
group
=
GroupNodePtr_t
());
void
initParent
(
const
std
::
string
&
nodeName
,
NodePtr_t
node
);
void
addNode
(
const
std
::
string
&
nodeName
,
NodePtr_t
node
);
void
addGroup
(
const
std
::
string
&
groupName
,
GroupNodePtr_t
group
);
...
...
This diff is collapsed.
Click to expand it.
src/windows-manager.cpp
+
19
−
2
View file @
e3e1bb8a
...
...
@@ -142,6 +142,22 @@ namespace graphics {
return
parentName
;
}
NodePtr_t
WindowsManager
::
find
(
const
std
::
string
name
,
GroupNodePtr_t
group
)
{
std
::
map
<
std
::
string
,
NodePtr_t
>::
iterator
it
=
nodes_
.
find
(
name
);
if
(
it
==
nodes_
.
end
())
{
std
::
string
::
size_type
slash
=
name
.
find_first_of
(
'/'
);
if
(
slash
==
std
::
string
::
npos
)
return
NodePtr_t
();
std
::
map
<
std
::
string
,
GroupNodePtr_t
>::
iterator
itg
=
groupNodes_
.
find
(
name
.
substr
(
0
,
slash
));
if
(
itg
==
groupNodes_
.
end
())
return
NodePtr_t
();
return
find
(
name
.
substr
(
slash
+
1
),
itg
->
second
);
}
return
it
->
second
;
}
void
WindowsManager
::
initParent
(
const
std
::
string
&
nodeName
,
NodePtr_t
node
)
...
...
@@ -755,14 +771,15 @@ namespace graphics {
const
value_type
*
configurationCorba
)
{
const
std
::
string
nodeName
(
nodeNameCorba
);
if
(
nodes_
.
find
(
nodeName
)
==
nodes_
.
end
())
{
NodePtr_t
updatedNode
=
find
(
nodeName
);
if
(
!
updatedNode
)
{
//no node named nodeName
std
::
cout
<<
"No Node named
\"
"
<<
nodeName
<<
"
\"
"
<<
std
::
endl
;
return
false
;
}
else
{
NodeConfiguration
newNodeConfiguration
;
newNodeConfiguration
.
node
=
nodes_
[
nodeName
]
;
newNodeConfiguration
.
node
=
updatedNode
;
try
{
newNodeConfiguration
.
position
=
WindowsManager
::
corbaConfToOsgVec3
(
configurationCorba
);
...
...
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