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
c396c528
Commit
c396c528
authored
7 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
shared_ptr compliant for c++98 and c++11
parent
53181b68
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
include/gepetto/gui/fwd.hh
+2
-2
2 additions, 2 deletions
include/gepetto/gui/fwd.hh
src/windows-manager.cpp
+24
-24
24 additions, 24 deletions
src/windows-manager.cpp
with
26 additions
and
26 deletions
include/gepetto/gui/fwd.hh
+
2
−
2
View file @
c396c528
#ifndef GEPETTO_GUI_FWD_HH
#define GEPETTO_GUI_FWD_HH
#include
<
boost/shared_ptr.hpp
>
#include
<
gepetto/viewer/macros.h
>
#include
<gepetto/gui/config-dep.hh>
namespace
gepetto
{
...
...
@@ -19,7 +19,7 @@ namespace gepetto {
class
ViewerCorbaServer
;
class
WindowsManager
;
typedef
boost
::
shared_ptr
<
WindowsManager
>
WindowsManagerPtr_t
;
typedef
shared_ptr
<
WindowsManager
>
WindowsManagerPtr_t
;
#if GEPETTO_GUI_HAS_PYTHONQT
class
PythonWidget
;
...
...
This diff is collapsed.
Click to expand it.
src/windows-manager.cpp
+
24
−
24
View file @
c396c528
...
...
@@ -390,7 +390,7 @@ namespace graphics {
return
false
;
}
}
bool
WindowsManager
::
attachCameraToNode
(
const
std
::
string
&
nodeName
,
const
WindowID
windowId
)
{
NodePtr_t
node
=
getNode
(
nodeName
,
true
);
...
...
@@ -413,7 +413,7 @@ namespace graphics {
}
osgFrameMutex
().
lock
();
windowManagers_
[
windowId
]
->
detachCamera
();
osgFrameMutex
().
unlock
();
osgFrameMutex
().
unlock
();
return
true
;
}
...
...
@@ -491,7 +491,7 @@ namespace graphics {
bool
WindowsManager
::
resizeCapsule
(
const
std
::
string
&
capsuleName
,
float
newHeight
)
throw
(
std
::
exception
){
NodePtr_t
node
=
getNode
(
capsuleName
,
true
);
try
{
LeafNodeCapsulePtr_t
cap
=
boost
::
dynamic_pointer_cast
<
LeafNodeCapsule
>
(
node
);
LeafNodeCapsulePtr_t
cap
=
dynamic_pointer_cast
<
LeafNodeCapsule
>
(
node
);
cap
->
resize
(
newHeight
);
}
catch
(
const
std
::
exception
&
exc
)
{
std
::
cout
<<
capsuleName
<<
"isn't a capsule."
<<
std
::
endl
;
...
...
@@ -503,7 +503,7 @@ namespace graphics {
bool
WindowsManager
::
resizeArrow
(
const
std
::
string
&
arrowName
,
float
newRadius
,
float
newLength
)
throw
(
std
::
exception
){
NodePtr_t
node
=
getNode
(
arrowName
,
true
);
try
{
LeafNodeArrowPtr_t
arrow
=
boost
::
dynamic_pointer_cast
<
LeafNodeArrow
>
(
node
);
LeafNodeArrowPtr_t
arrow
=
dynamic_pointer_cast
<
LeafNodeArrow
>
(
node
);
arrow
->
resize
(
newRadius
,
newLength
);
}
catch
(
const
std
::
exception
&
exc
)
{
std
::
cout
<<
arrowName
<<
"isn't an arrow."
<<
std
::
endl
;
...
...
@@ -603,38 +603,38 @@ namespace graphics {
osgFrameMutex
().
unlock
();
return
true
;
}
bool
WindowsManager
::
setLineStartPoint
(
const
std
::
string
&
lineName
,
const
osgVector3
&
pos1
)
{
RETURN_FALSE_IF_NODE_DOES_NOT_EXIST
(
lineName
);
LeafNodeLinePtr_t
line
=
boost
::
dynamic_pointer_cast
<
LeafNodeLine
>
(
getNode
(
lineName
));
LeafNodeLinePtr_t
line
=
dynamic_pointer_cast
<
LeafNodeLine
>
(
getNode
(
lineName
));
osgFrameMutex
().
lock
();
line
->
setStartPoint
(
pos1
);
osgFrameMutex
().
unlock
();
return
true
;
}
bool
WindowsManager
::
setLineEndPoint
(
const
std
::
string
&
lineName
,
const
osgVector3
&
pos2
)
{
RETURN_FALSE_IF_NODE_DOES_NOT_EXIST
(
lineName
);
LeafNodeLinePtr_t
line
=
boost
::
dynamic_pointer_cast
<
LeafNodeLine
>
(
getNode
(
lineName
));
LeafNodeLinePtr_t
line
=
dynamic_pointer_cast
<
LeafNodeLine
>
(
getNode
(
lineName
));
osgFrameMutex
().
lock
();
line
->
setEndPoint
(
pos2
);
osgFrameMutex
().
unlock
();
return
true
;
}
bool
WindowsManager
::
setLineExtremalPoints
(
const
std
::
string
&
lineName
,
const
osgVector3
&
pos1
,
const
osgVector3
&
pos2
)
{
RETURN_FALSE_IF_NODE_DOES_NOT_EXIST
(
lineName
);
LeafNodeLinePtr_t
line
=
boost
::
dynamic_pointer_cast
<
LeafNodeLine
>
(
getNode
(
lineName
));
LeafNodeLinePtr_t
line
=
dynamic_pointer_cast
<
LeafNodeLine
>
(
getNode
(
lineName
));
osgFrameMutex
().
lock
();
line
->
setStartPoint
(
pos1
);
line
->
setEndPoint
(
pos2
);
...
...
@@ -658,7 +658,7 @@ namespace graphics {
osgFrameMutex
().
unlock
();
return
true
;
}
bool
WindowsManager
::
setCurvePoints
(
const
std
::
string
&
curveName
,
const
Vec3ArrayPtr_t
&
pos
)
{
...
...
@@ -667,7 +667,7 @@ namespace graphics {
std
::
cout
<<
"Need at least two points"
<<
std
::
endl
;
return
false
;
}
LeafNodeLinePtr_t
curve
=
boost
::
dynamic_pointer_cast
<
LeafNodeLine
>
(
getNode
(
curveName
));
LeafNodeLinePtr_t
curve
=
dynamic_pointer_cast
<
LeafNodeLine
>
(
getNode
(
curveName
));
osgFrameMutex
().
lock
();
curve
->
setPoints
(
pos
);
osgFrameMutex
().
unlock
();
...
...
@@ -681,7 +681,7 @@ namespace graphics {
std
::
cerr
<<
"Node
\"
"
<<
curveName
<<
"
\"
not found."
<<
std
::
endl
;
return
false
;
}
else
{
LeafNodeLinePtr_t
curve
(
boost
::
dynamic_pointer_cast
LeafNodeLinePtr_t
curve
(
dynamic_pointer_cast
<
LeafNodeLine
>
(
node
));
if
(
!
curve
)
{
std
::
cerr
<<
"Node
\"
"
<<
curveName
<<
"
\"
is not a curve."
<<
std
::
endl
;
...
...
@@ -697,7 +697,7 @@ namespace graphics {
bool
WindowsManager
::
setCurveLineWidth
(
const
std
::
string
&
curveName
,
const
float
&
width
)
{
NodePtr_t
node
=
getNode
(
curveName
,
true
);
LeafNodeLinePtr_t
curve
(
boost
::
dynamic_pointer_cast
<
LeafNodeLine
>
(
node
));
LeafNodeLinePtr_t
curve
(
dynamic_pointer_cast
<
LeafNodeLine
>
(
node
));
if
(
!
curve
)
{
std
::
cerr
<<
"Node
\"
"
<<
curveName
<<
"
\"
is not a curve."
<<
std
::
endl
;
return
false
;
...
...
@@ -744,7 +744,7 @@ namespace graphics {
const
std
::
string
&
filename
)
{
NodePtr_t
node
(
getNode
(
nodeName
,
true
));
LeafNodeFacePtr_t
faceNode
(
boost
::
dynamic_pointer_cast
<
LeafNodeFace
>
LeafNodeFacePtr_t
faceNode
(
dynamic_pointer_cast
<
LeafNodeFace
>
(
node
));
if
(
!
faceNode
)
{
std
::
ostringstream
oss
;
...
...
@@ -825,7 +825,7 @@ namespace graphics {
}
return
l
;
}
std
::
vector
<
std
::
string
>
WindowsManager
::
getGroupNodeList
(
const
std
::
string
&
group
)
{
std
::
vector
<
std
::
string
>
l
;
...
...
@@ -845,7 +845,7 @@ namespace graphics {
}
return
l
;
}
std
::
vector
<
std
::
string
>
WindowsManager
::
getSceneList
()
{
std
::
vector
<
std
::
string
>
l
;
...
...
@@ -948,7 +948,7 @@ namespace graphics {
NodePtr_t
link
;
for
(
std
::
size_t
i
=
0
;
i
<
urdf
->
getNumOfChildren
();
i
++
)
{
link
=
urdf
->
getChild
(
i
);
GroupNodePtr_t
groupNode
(
boost
::
dynamic_pointer_cast
GroupNodePtr_t
groupNode
(
dynamic_pointer_cast
<
GroupNode
>
(
link
));
if
(
groupNode
)
{
addGroup
(
link
->
getID
(),
groupNode
,
urdf
);
...
...
@@ -1074,7 +1074,7 @@ namespace graphics {
return
Configuration
(
node
->
getStaticPosition
(),
node
->
getStaticRotation
());
}
bool
WindowsManager
::
setStaticTransform
(
const
std
::
string
&
nodeName
,
const
Configuration
&
transform
)
{
...
...
@@ -1305,7 +1305,7 @@ namespace graphics {
std
::
pair
<
osgVector3
,
osgQuat
>
posQuat
=
node
->
getGlobalTransform
();
return
Configuration
(
posQuat
.
first
,
posQuat
.
second
);
}
bool
WindowsManager
::
setBackgroundColor1
(
const
WindowID
windowId
,
const
Color_t
&
color
)
{
WindowManagerPtr_t
wm
=
getWindowManager
(
windowId
,
true
);
...
...
@@ -1314,7 +1314,7 @@ namespace graphics {
osgFrameMutex
().
unlock
();
return
true
;
}
bool
WindowsManager
::
setBackgroundColor2
(
const
WindowID
windowId
,
const
Color_t
&
color
)
{
WindowManagerPtr_t
wm
=
getWindowManager
(
windowId
,
true
);
...
...
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