5 #ifndef GEPETTO_VIEWER_CORBA_CONVERSIONS_HH 6 #define GEPETTO_VIEWER_CORBA_CONVERSIONS_HH 9 #include <omniORB4/CORBA.h> 10 #include <gepetto/viewer/corba/graphical-interface.hh> 18 #if __cplusplus >= 201103L 20 template<
typename Scalar>
21 PositionSeq positionSeq(std::initializer_list< std::initializer_list<Scalar> > l)
23 Position* posSeq = PositionSeq::allocbuf((CORBA::ULong) l.size());
25 PositionSeq seq ((CORBA::ULong) l.size(), (CORBA::ULong) l.size(), posSeq);
27 for (
const std::initializer_list<Scalar>& el : l) {
28 assert(el.size() == 3);
29 const Scalar* f = el.begin();
30 posSeq[i][0] =
static_cast<float>(*(f++));
31 posSeq[i][1] =
static_cast<float>(*(f++));
32 posSeq[i][2] =
static_cast<float>(*(f++));
38 #endif // __cplusplus >= 201103L 44 #endif // GEPETTO_VIEWER_CORBA_CONVERSIONS_HH float Position[3]
Definition: graphical-interface.idl:22
sequence< Position > PositionSeq
Definition: graphical-interface.idl:27
Definition: graphical-interface.idl:9