5 #ifndef __pinocchio_multibody_visitior_joint_binary_visitor_hpp__ 6 #define __pinocchio_multibody_visitior_joint_binary_visitor_hpp__ 8 #include <boost/variant.hpp> 10 #include "pinocchio/multibody/joint/joint-base.hpp" 11 #include "pinocchio/multibody/visitor/fusion.hpp" 19 typedef boost::blank NoArg;
26 template<
typename Jo
intVisitorDerived,
typename ReturnType =
void>
30 template<
typename Jo
intModelDerived1,
typename Jo
intModelDerived2,
typename ArgsTmp>
37 InternalVisitorModelAndData<JointModelDerived1,JointModelDerived2,ArgsTmp> visitor(jdata1,jdata2,args);
38 return visitor(jmodel1.derived(),jmodel2.derived());
41 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl,
typename ArgsTmp>
49 InternalVisitorModelAndData<JointModel,JointModel,ArgsTmp> visitor(jdata1,jdata2,args);
50 return boost::apply_visitor(visitor,jmodel1,jmodel2);
53 template<
typename Jo
intModelDerived1,
typename Jo
intModelDerived2>
59 InternalVisitorModelAndData<JointModelDerived1,JointModelDerived2,NoArg> visitor(jdata1,jdata2);
60 return visitor(jmodel1.derived(),jmodel2.derived());
63 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
70 InternalVisitorModelAndData<JointModel,JointModel,NoArg> visitor(jdata1,jdata2);
71 return boost::apply_visitor(visitor,jmodel1,jmodel2);
74 template<
typename Jo
intModelDerived1,
typename Jo
intModelDerived2,
typename ArgsTmp>
79 InternalVisitorModel<ArgsTmp> visitor(args);
80 return visitor(jmodel1.derived(),jmodel2.derived());
83 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl,
typename ArgsTmp>
88 InternalVisitorModel<ArgsTmp> visitor(args);
89 return boost::apply_visitor(visitor,jmodel1,jmodel2);
92 template<
typename Jo
intModelDerived1,
typename Jo
intModelDerived2>
96 InternalVisitorModel<NoArg> visitor;
97 return visitor(jmodel1.derived(),jmodel2.derived());
100 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
104 InternalVisitorModel<NoArg> visitor;
105 return boost::apply_visitor(visitor,jmodel1,jmodel2);
110 template<
typename Jo
intModel1,
typename Jo
intModel2,
typename ArgType>
111 struct InternalVisitorModelAndData
112 :
public boost::static_visitor<ReturnType>
114 typedef typename JointModel1::JointDataDerived JointData1;
115 typedef typename JointModel2::JointDataDerived JointData2;
117 InternalVisitorModelAndData(JointData1 & jdata1,
125 template<
typename Jo
intModelDerived1,
typename Jo
intModelDerived2>
129 return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived1,JointModelDerived2>,
130 bf::append(boost::ref(jmodel1.derived()),
131 boost::ref(jmodel2.derived()),
143 template<
typename Jo
intModel1,
typename Jo
intModel2>
144 struct InternalVisitorModelAndData<JointModel1,JointModel2,NoArg>
145 :
public boost::static_visitor<ReturnType>
147 typedef typename JointModel1::JointDataDerived JointData1;
148 typedef typename JointModel2::JointDataDerived JointData2;
150 InternalVisitorModelAndData(JointData1 & jdata1, JointData2 & jdata2)
155 template<
typename Jo
intModelDerived1,
typename Jo
intModelDerived2>
159 return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived1,JointModelDerived2>,
160 bf::make_vector(boost::ref(jmodel1.derived()),
161 boost::ref(jmodel2.derived()),
170 template<
typename ArgType,
typename Dummy =
void>
171 struct InternalVisitorModel
172 :
public boost::static_visitor<ReturnType>
174 InternalVisitorModel(ArgType args)
178 template<
typename Jo
intModel1,
typename Jo
intModel2>
182 return bf::invoke(&JointVisitorDerived::template algo<JointModel1,JointModel2>,
183 bf::append(boost::ref(jmodel1.derived()),
184 boost::ref(jmodel2.derived()),
191 template<
typename Dummy>
192 struct InternalVisitorModel<NoArg,Dummy>
193 :
public boost::static_visitor<ReturnType>
195 InternalVisitorModel() {}
197 template<
typename Jo
intModel1,
typename Jo
intModel2>
201 return JointVisitorDerived::
202 template algo<JointModel1,JointModel2>(jmodel1.derived(),
212 #endif // ifndef __pinocchio_multibody_visitior_joint_binary_visitor_hpp__ Base structure for Binary visitation of two JointModels. This structure provides runners to call the ...
Main pinocchio namespace.