| Line |
Branch |
Exec |
Source |
| 1 |
|
|
// |
| 2 |
|
|
// Copyright (c) CNRS |
| 3 |
|
|
// Author: Joseph Mirabel |
| 4 |
|
|
// |
| 5 |
|
|
|
| 6 |
|
|
#ifndef HPP_GUI_CONVERSIONS_HH |
| 7 |
|
|
#define HPP_GUI_CONVERSIONS_HH |
| 8 |
|
|
|
| 9 |
|
|
#include <gepetto/gui/windows-manager.hh> |
| 10 |
|
|
#include <hpp/common-idl.hh> |
| 11 |
|
|
|
| 12 |
|
|
namespace hpp { |
| 13 |
|
|
namespace gui { |
| 14 |
|
✗ |
inline void fromHPP(const hpp::floatSeq_var& in, osgVector3& v) { |
| 15 |
|
|
typedef gepetto::viewer::WindowsManager::value_type type; |
| 16 |
|
✗ |
const hpp::floatSeq& t(in.in()); |
| 17 |
|
✗ |
v.set((type)t[0], (type)t[1], (type)t[2]); |
| 18 |
|
|
} |
| 19 |
|
|
|
| 20 |
|
✗ |
inline void fromHPP(const hpp::Transform__slice* t, osgVector3& v) { |
| 21 |
|
|
typedef gepetto::viewer::WindowsManager::value_type type; |
| 22 |
|
✗ |
v.set((type)t[0], (type)t[1], (type)t[2]); |
| 23 |
|
|
} |
| 24 |
|
|
|
| 25 |
|
|
inline void fromHPP(const hpp::Transform__var& in, osgVector3& v) { |
| 26 |
|
|
fromHPP(in.in(), v); |
| 27 |
|
|
} |
| 28 |
|
|
|
| 29 |
|
✗ |
inline void fromHPP(const hpp::Transform__slice* t, osgQuat& q) { |
| 30 |
|
|
typedef gepetto::viewer::WindowsManager::value_type type; |
| 31 |
|
✗ |
q.set((type)t[3], (type)t[4], (type)t[5], (type)t[6]); |
| 32 |
|
|
} |
| 33 |
|
|
|
| 34 |
|
|
inline void fromHPP(const hpp::Transform__var& in, osgQuat& q) { |
| 35 |
|
|
fromHPP(in.in(), q); |
| 36 |
|
|
} |
| 37 |
|
|
|
| 38 |
|
✗ |
inline void fromHPP(const hpp::Transform__slice* in, |
| 39 |
|
|
gepetto::viewer::Configuration& c) { |
| 40 |
|
✗ |
fromHPP(in, c.position); |
| 41 |
|
✗ |
fromHPP(in, c.quat); |
| 42 |
|
|
} |
| 43 |
|
|
|
| 44 |
|
✗ |
inline void fromHPP(const hpp::Transform__var& in, |
| 45 |
|
|
gepetto::viewer::Configuration& c) { |
| 46 |
|
✗ |
fromHPP(in.in(), c); |
| 47 |
|
|
} |
| 48 |
|
|
|
| 49 |
|
✗ |
inline void fromHPP(const hpp::TransformSeq& in, |
| 50 |
|
|
std::vector<gepetto::viewer::Configuration>& c) { |
| 51 |
|
✗ |
c.resize(in.length()); |
| 52 |
|
✗ |
for (std::size_t i = 0; i < in.length(); ++i) |
| 53 |
|
✗ |
fromHPP(in[(CORBA::ULong)i], c[i]); |
| 54 |
|
|
} |
| 55 |
|
|
|
| 56 |
|
|
} // namespace gui |
| 57 |
|
|
} // namespace hpp |
| 58 |
|
|
|
| 59 |
|
|
#endif // HPP_GUI_CONVERSIONS_HH |
| 60 |
|
|
|