hpp-gui  4.11.0
Graphical interface for HPP
conversions.hh
Go to the documentation of this file.
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 
11 namespace hpp {
12  namespace gui {
13  inline void fromHPP(const hpp::floatSeq_var& in, osgVector3& v)
14  {
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  {
22  typedef gepetto::viewer::WindowsManager::value_type type;
23  v.set((type)t[0], (type)t[1], (type)t[2]);
24  }
25 
26  inline void fromHPP(const hpp::Transform__var& in, osgVector3& v)
27  {
28  fromHPP (in.in(), v);
29  }
30 
31  inline void fromHPP(const hpp::Transform__slice* t, osgQuat& q)
32  {
33  typedef gepetto::viewer::WindowsManager::value_type type;
34  q.set((type)t[3], (type)t[4], (type)t[5], (type)t[6]);
35  }
36 
37  inline void fromHPP(const hpp::Transform__var& in, osgQuat& q)
38  {
39  fromHPP (in.in(), q);
40  }
41 
42  inline void fromHPP(const hpp::Transform__slice* in, gepetto::viewer::Configuration& c)
43  {
44  fromHPP(in, c.position);
45  fromHPP(in, c.quat);
46  }
47 
48  inline void fromHPP(const hpp::Transform__var& in, gepetto::viewer::Configuration& c)
49  {
50  fromHPP(in.in(), c);
51  }
52 
53  inline void fromHPP(const hpp::TransformSeq& in, std::vector<gepetto::viewer::Configuration>& c)
54  {
55  c.resize (in.length());
56  for (std::size_t i = 0; i < in.length(); ++i)
57  fromHPP (in[(CORBA::ULong)i], c[i]);
58  }
59 
60  } // namespace gui
61 } // namespace hpp
62 
63 #endif // HPP_GUI_CONVERSIONS_HH
namespace that encapsulate all the softwares of humanoid-path-planner
Definition: __init__.py:1
void fromHPP(const hpp::floatSeq_var &in, osgVector3 &v)
Definition: conversions.hh:13