Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-gui
Commits
88ac6fc3
Commit
88ac6fc3
authored
Mar 29, 2018
by
Joseph Mirabel
Committed by
Joseph Mirabel
Mar 29, 2018
Browse files
Add some conversion functions.
parent
c2c7da18
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/hppwidgetsplugin/conversions.hh
View file @
88ac6fc3
...
...
@@ -17,26 +17,46 @@ namespace hpp {
v
.
set
((
type
)
t
[
0
],
(
type
)
t
[
1
],
(
type
)
t
[
2
]);
}
inline
void
fromHPP
(
const
hpp
::
Transform__
var
&
in
,
osgVector3
&
v
)
inline
void
fromHPP
(
const
hpp
::
Transform__
slice
*
t
,
osgVector3
&
v
)
{
typedef
graphics
::
WindowsManager
::
value_type
type
;
const
hpp
::
Transform__slice
*
t
(
in
.
in
());
v
.
set
((
type
)
t
[
0
],
(
type
)
t
[
1
],
(
type
)
t
[
2
]);
}
inline
void
fromHPP
(
const
hpp
::
Transform__var
&
in
,
osgQuat
&
q
)
inline
void
fromHPP
(
const
hpp
::
Transform__var
&
in
,
osgVector3
&
v
)
{
fromHPP
(
in
.
in
(),
v
);
}
inline
void
fromHPP
(
const
hpp
::
Transform__slice
*
t
,
osgQuat
&
q
)
{
typedef
graphics
::
WindowsManager
::
value_type
type
;
const
hpp
::
Transform__slice
*
t
(
in
.
in
());
q
.
set
((
type
)
t
[
3
],
(
type
)
t
[
4
],
(
type
)
t
[
5
],
(
type
)
t
[
6
]);
}
inline
void
fromHPP
(
const
hpp
::
Transform__var
&
in
,
graphics
::
Configuration
&
c
)
inline
void
fromHPP
(
const
hpp
::
Transform__var
&
in
,
osgQuat
&
q
)
{
fromHPP
(
in
.
in
(),
q
);
}
inline
void
fromHPP
(
const
hpp
::
Transform__slice
*
in
,
graphics
::
Configuration
&
c
)
{
fromHPP
(
in
,
c
.
position
);
fromHPP
(
in
,
c
.
quat
);
}
inline
void
fromHPP
(
const
hpp
::
Transform__var
&
in
,
graphics
::
Configuration
&
c
)
{
fromHPP
(
in
.
in
(),
c
);
}
inline
void
fromHPP
(
const
hpp
::
TransformSeq
&
in
,
std
::
vector
<
graphics
::
Configuration
>&
c
)
{
c
.
resize
(
in
.
length
());
for
(
std
::
size_t
i
=
0
;
i
<
in
.
length
();
++
i
)
fromHPP
(
in
[(
CORBA
::
ULong
)
i
],
c
[
i
]);
}
}
// namespace gui
}
// namespace hpp
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment