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
Guilhem Saurel
gepetto-viewer-corba
Commits
905dfd4b
Commit
905dfd4b
authored
5 years ago
by
Joseph Mirabel
Browse files
Options
Downloads
Patches
Plain Diff
Window ID is a string and not an integer.
parent
1f877657
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
idl/gepetto/viewer/graphical-interface.idl
+23
-23
23 additions, 23 deletions
idl/gepetto/viewer/graphical-interface.idl
src/conversions.hh
+2
-11
2 additions, 11 deletions
src/conversions.hh
src/graphical-interface.impl.hh
+14
-16
14 additions, 16 deletions
src/graphical-interface.impl.hh
with
39 additions
and
50 deletions
idl/gepetto/viewer/graphical-interface.idl
+
23
−
23
View file @
905dfd4b
...
...
@@ -21,7 +21,7 @@ typedef float Transform [7];
typedef float Vector2 [2];
typedef float Position [3];
typedef float Color [4];
typedef
unsigned lo
ng WindowID;
typedef
stri
ng WindowID;
typedef sequence <string> Names_t; /// Sequence of names
typedef sequence<float> floatSeq;
typedef sequence<Position> PositionSeq;
...
...
@@ -49,18 +49,18 @@ typedef sequence<Transform> TransformSeq;
/// Create a new window.
/// \param input name : name of the new window.
/// return the ID of the newly create window.
unsigned long
createWindow(in string name) raises (Error);
unsigned long
getWindowID (in string name) raises (Error);
WindowID
createWindow(in string name) raises (Error);
WindowID
getWindowID (in string name) raises (Error);
/// change the background color1
/// \param input wi
ndowI
d : ID of the window
/// \param input wid : ID of the window
/// \param input RGBAcolor : desired color
boolean setBackgroundColor1(in
unsigned long windowI
d,in Color RGBAcolor);
boolean setBackgroundColor1(in
WindowID wi
d,in Color RGBAcolor);
/// change the background color2
/// \param input wi
ndowI
d : ID of the window
/// \param input wid : ID of the window
/// \param input RGBAcolor : desired color
boolean setBackgroundColor2(in
unsigned long windowI
d,in Color RGBAcolor);
boolean setBackgroundColor2(in
WindowID wi
d,in Color RGBAcolor);
/// Create a group node.
/// \param input sceneName : name of the group.
...
...
@@ -73,8 +73,8 @@ typedef sequence<Transform> TransformSeq;
/// Add groupNode sceneName to the WindowManager windowName so
/// sceneName and all its children will be displayed in the window windowName.
/// \param input sceneName : name of the groupNode.
/// \param input wi
ndowI
d : ID of rhe window.
boolean addSceneToWindow(in string sceneName, in
unsigned long windowI
d) raises (Error);
/// \param input wid : ID of rhe window.
boolean addSceneToWindow(in string sceneName, in
WindowID wi
d) raises (Error);
/// \}
...
...
@@ -445,7 +445,7 @@ typedef sequence<Transform> TransformSeq;
void
captureFrame
(
in
WindowID
wid
,
in
string
imageFilename
)
raises
(
Error
)
;
///
Start
capturing
a
window
into
image
files
.
///
\
param
wi
ndowI
d
the
ID
of
the
window
///
\
param
wid
the
ID
of
the
window
///
\
param
filename
,
extension
image
files
will
be
///
'<filename>_<sequence_number>.<extension>'
///
...
...
@@ -457,11 +457,11 @@ typedef sequence<Transform> TransformSeq;
///
-
\
c
libx264
is
not
installed
by
default
.
On
ubuntu
12.04
,
///
it
is
part
of
the
package
\
c
libavcodec
-
extra
-53.
///
-
\
c
yuv420p
is
required
only
to
enable
support
for
old
media
players
.
boolean
startCapture
(
in
unsigned
long
windowI
d
,
in
string
filename
,
boolean
startCapture
(
in
WindowID
wi
d
,
in
string
filename
,
in
string
extension
)
raises
(
Error
)
;
///
Stop
the
running
capture
of
a
window
.
boolean
stopCapture
(
in
unsigned
long
windowI
d
)
raises
(
Error
)
;
boolean
stopCapture
(
in
WindowID
wi
d
)
raises
(
Error
)
;
///
Configure
the
capture
of
node
transformation
in
YAML
format
///
\
param
filename
file
where
to
write
.
...
...
@@ -486,7 +486,7 @@ typedef sequence<Transform> TransformSeq;
boolean
writeNodeFile
(
in
string
nodeName
,
in
string
filename
)
raises
(
Error
)
;
///
Write
the
nodes
contained
in
the
window
to
filename
boolean
writeWindowFile
(
in
unsigned
long
windowI
d
,
in
string
filename
)
raises
(
Error
)
;
boolean
writeWindowFile
(
in
WindowID
wi
d
,
in
string
filename
)
raises
(
Error
)
;
///
\
}
...
...
@@ -495,31 +495,31 @@ typedef sequence<Transform> TransformSeq;
///
\
{
///
Attach
the
camera
to
the
Node
nodeName
in
the
WindowManager
///
pointed
by
wi
ndowI
d
///
pointed
by
wid
///
If
already
attached
,
detach
from
the
other
node
///
\
param
input
nodeName
:
name
of
the
node
///
\
param
input
wi
ndowI
d
:
ID
of
the
window
boolean
attachCameraToNode
(
in
string
nodeName
,
in
unsigned
long
windowI
d
)
raises
(
Error
)
;
///
\
param
input
wid
:
ID
of
the
window
boolean
attachCameraToNode
(
in
string
nodeName
,
in
WindowID
wi
d
)
raises
(
Error
)
;
///
Detach
the
camera
of
WindowManager
pointed
by
wi
ndowI
d
///
Detach
the
camera
of
WindowManager
pointed
by
wid
///
from
any
node
///
\
param
input
wi
ndowI
d
:
ID
of
the
window
boolean
detachCamera
(
in
unsigned
long
windowI
d
)
raises
(
Error
)
;
///
\
param
input
wid
:
ID
of
the
window
boolean
detachCamera
(
in
WindowID
wi
d
)
raises
(
Error
)
;
///
get
the
matrix
transform
of
the
current
position
of
the
camera
///
Camera
frame
convention
(
OpenSceneGraph
):
looking
through
the
optic
axis
as
a
photographer
,
///
axis
are
:
X
->
right
,
Y
->
up
,
Z
->
behind
///
It
corresponds
to
Hartley
and
Zisserman
's frame convention with a 180° rotation around the Y axis
/// \param input wi
ndowI
d : ID of the window
Transform getCameraTransform(in
unsigned long windowI
d) raises (Error);
/// \param input wid : ID of the window
Transform getCameraTransform(in
WindowID wi
d) raises (Error);
/// set the matrix transform of the current camera
/// Camera frame convention (OpenSceneGraph): looking through the optic axis as a photographer,
/// axis are: X -> right, Y -> up, Z -> behind
/// It corresponds to Hartley and Zisserman'
s
frame
convention
with
a
180
°
rotation
around
the
Y
axis
///
\
param
input
wi
ndowI
d
:
ID
of
the
window
///
\
param
input
wid
:
ID
of
the
window
///
\
param
input
configuration
:
the
desired
configuration
of
the
camera
boolean
setCameraTransform
(
in
unsigned
long
windowI
d
,
in
Transform
configuration
)
raises
(
Error
)
;
boolean
setCameraTransform
(
in
WindowID
wi
d
,
in
Transform
configuration
)
raises
(
Error
)
;
//
register
a
Node
callback
boolean
registerNodeCallback
(
in
NodeCallback
cb
)
raises
(
Error
)
;
...
...
This diff is collapsed.
Click to expand it.
src/conversions.hh
+
2
−
11
View file @
905dfd4b
...
...
@@ -12,8 +12,6 @@ namespace gepetto {
namespace
viewer
{
namespace
corba
{
namespace
impl
{
typedef
GraphicalInterface
::
WindowID
WindowID
;
template
<
typename
Input
,
typename
Output
>
void
to
(
const
Input
&
in
,
Output
&
out
)
{
for
(
CORBA
::
ULong
i
=
0
;
i
<
in
.
length
();
++
i
)
...
...
@@ -44,8 +42,8 @@ namespace gepetto {
enum
ArgType
{
STRING
,
STRING_LIST
,
OUT_STRING_LIST
,
COLOR
,
TRANSFORM
,
TRANSFORM_SEQ
,
POSITION
,
POSITION_SEQ
,
FLOAT
,
SHORT
,
LONG
,
WINDOW_ID
,
BOOL
,
VOID
,
GLMODE
,
VECTOR2
FLOAT
,
SHORT
,
LONG
,
BOOL
,
VOID
,
GLMODE
,
VECTOR2
,
WINDOW_ID
=
STRING
};
template
<
int
what
>
struct
traits
{};
...
...
@@ -138,13 +136,6 @@ namespace gepetto {
static
int
op
(
const
In_t
&
in
)
{
return
in
;
}
static
Ret_t
ret
(
Out_t
in
)
{
return
in
;
}
};
template
<
>
struct
traits
<
WINDOW_ID
>
{
typedef
WindowsManager
::
WindowID
Out_t
;
typedef
const
WindowID
In_t
;
typedef
WindowID
Ret_t
;
static
Out_t
op
(
In_t
&
in
)
{
return
in
;
}
static
Ret_t
ret
(
Out_t
in
)
{
return
in
;
}
};
template
<
>
struct
traits
<
BOOL
>
{
typedef
bool
In_t
;
typedef
In_t
Out_t
;
...
...
This diff is collapsed.
Click to expand it.
src/graphical-interface.impl.hh
+
14
−
16
View file @
905dfd4b
...
...
@@ -30,8 +30,6 @@ private:
typedef
gepetto
::
gui
::
WindowsManager
::
value_type
value_type
;
public:
typedef
CORBA
::
ULong
WindowID
;
/**
\brief Default constructor
*/
...
...
@@ -50,15 +48,15 @@ public:
virtual
void
refresh
();
virtual
void
setRefreshIsSynchronous
(
bool
synchronous
);
virtual
WindowID
createWindow
(
const
char
*
windowNameCorba
);
virtual
WindowID
getWindowID
(
const
char
*
windowNameCorba
);
virtual
char
*
createWindow
(
const
char
*
windowNameCorba
);
virtual
char
*
getWindowID
(
const
char
*
windowNameCorba
);
virtual
void
createScene
(
const
char
*
sceneNameCorba
);
virtual
void
createSceneWithFloor
(
const
char
*
sceneNameCorba
);
virtual
bool
addSceneToWindow
(
const
char
*
sceneNameCorba
,
const
WindowID
windowId
);
virtual
bool
addSceneToWindow
(
const
char
*
sceneNameCorba
,
const
char
*
windowId
);
virtual
bool
attachCameraToNode
(
const
char
*
nodeName
,
const
WindowID
windowId
);
virtual
bool
detachCamera
(
const
WindowID
windowId
);
virtual
bool
attachCameraToNode
(
const
char
*
nodeName
,
const
char
*
windowId
);
virtual
bool
detachCamera
(
const
char
*
windowId
);
virtual
bool
nodeExists
(
const
char
*
nodeName
);
...
...
@@ -86,7 +84,7 @@ public:
virtual
bool
addSphere
(
const
char
*
sphereName
,
float
radius
,
const
Color
color
);
virtual
bool
addLight
(
const
char
*
lightName
,
const
WindowID
windowId
,
float
radius
,
const
Color
color
);
virtual
bool
addLight
(
const
char
*
lightName
,
const
char
*
windowId
,
float
radius
,
const
Color
color
);
virtual
bool
addLine
(
const
char
*
lineName
,
const
value_type
*
pos1
,
const
value_type
*
pos2
,
const
Color
color
);
virtual
bool
setLineStartPoint
(
const
char
*
lineName
,
const
value_type
*
pos1
);
...
...
@@ -142,23 +140,23 @@ public:
virtual
bool
setLightingMode
(
const
char
*
nodeNameCorba
,
const
char
*
lightingModeCorba
);
virtual
bool
setHighlight
(
const
char
*
nodeNameCorba
,
::
CORBA
::
Long
state
);
virtual
void
captureFrame
(
const
WindowID
windowId
,
const
char
*
filename
);
virtual
bool
startCapture
(
const
WindowID
windowId
,
const
char
*
filename
,
virtual
void
captureFrame
(
const
char
*
windowId
,
const
char
*
filename
);
virtual
bool
startCapture
(
const
char
*
windowId
,
const
char
*
filename
,
const
char
*
extension
);
virtual
bool
stopCapture
(
const
WindowID
windowId
);
virtual
bool
stopCapture
(
const
char
*
windowId
);
virtual
bool
setCaptureTransform
(
const
char
*
filename
,
const
Names_t
&
nodename
);
virtual
void
captureTransformOnRefresh
(
bool
autoCapture
);
virtual
void
captureTransform
();
virtual
bool
writeBlenderScript
(
const
char
*
filename
,
const
Names_t
&
nodeNames
);
virtual
bool
writeNodeFile
(
const
char
*
nodename
,
const
char
*
filename
);
virtual
bool
writeWindowFile
(
const
WindowID
windowId
,
const
char
*
filename
);
virtual
bool
writeWindowFile
(
const
char
*
windowId
,
const
char
*
filename
);
virtual
Transform_slice
*
getNodeGlobalTransform
(
const
char
*
nodeName
);
virtual
void
deleteNode
(
const
char
*
nodeName
,
bool
all
);
virtual
bool
setBackgroundColor1
(
const
WindowID
windowId
,
const
Color
colorCorba
);
virtual
bool
setBackgroundColor2
(
const
WindowID
windowId
,
const
Color
colorCorba
);
virtual
Transform_slice
*
getCameraTransform
(
const
WindowID
windowId
);
virtual
bool
setCameraTransform
(
const
WindowID
windowId
,
const
value_type
*
configurationCorba
);
virtual
bool
setBackgroundColor1
(
const
char
*
windowId
,
const
Color
colorCorba
);
virtual
bool
setBackgroundColor2
(
const
char
*
windowId
,
const
Color
colorCorba
);
virtual
Transform_slice
*
getCameraTransform
(
const
char
*
windowId
);
virtual
bool
setCameraTransform
(
const
char
*
windowId
,
const
value_type
*
configurationCorba
);
// ------------- Properties -------------------- //
virtual
Names_t
*
getPropertyNames
(
const
char
*
nodeName
);
...
...
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