12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- //m.def("forward_kinematics", []
- //(
- // const Eigen::MatrixXd& C,
- // const Eigen::MatrixXi& BE,
- // const Eigen::MatrixXi& P,
- // std::vector<Eigen::Quaterniond, Eigen::aligned_allocator<Eigen::Quaterniond> > & dQ,
- // std::vector<Eigen::Vector3d> & dT,
- // std::vector<Eigen::Quaterniond, Eigen::aligned_allocator<Eigen::Quaterniond> > & vQ,
- // std::vector<Eigen::Vector3d> & vT
- //)
- //{
- // return igl::forward_kinematics(C, BE, P, dQ, dT, vQ, vT);
- //}, __doc_igl_forward_kinematics,
- //py::arg("C"), py::arg("BE"), py::arg("P"), py::arg("dQ"), py::arg("dT"), py::arg("vQ"), py::arg("vT"));
- m.def("forward_kinematics", []
- (
- const Eigen::MatrixXd& C,
- const Eigen::MatrixXi& BE,
- const Eigen::MatrixXi& P,
- const std::vector<Eigen::Quaterniond, Eigen::aligned_allocator<Eigen::Quaterniond> > dQ,
- py::list vQ,
- py::list vT
- )
- {
- std::vector<Eigen::Quaterniond, Eigen::aligned_allocator<Eigen::Quaterniond> > vQl;
- std::vector<Eigen::Vector3d> vTl;
- igl::forward_kinematics(C, BE, P, dQ, vQl, vTl);
- for (auto item : vQl) {
- py::object obj = py::cast(item);
- vQ.append(obj);
- }
- for (auto item : vTl) {
- py::object obj = py::cast(Eigen::MatrixXd(item));
- vT.append(obj);
- }
- }, __doc_igl_forward_kinematics,
- py::arg("C"), py::arg("BE"), py::arg("P"), py::arg("dQ"), py::arg("vQ"), py::arg("vT"));
- //m.def("forward_kinematics", []
- //(
- // const Eigen::MatrixXd& C,
- // const Eigen::MatrixXi& BE,
- // const Eigen::MatrixXi& P,
- // std::vector<Eigen::Quaterniond, Eigen::aligned_allocator<Eigen::Quaterniond> > & dQ,
- // std::vector<Eigen::Vector3d> & dT,
- // Eigen::MatrixXd& T
- //)
- //{
- // return igl::forward_kinematics(C, BE, P, dQ, dT, T);
- //}, __doc_igl_forward_kinematics,
- //py::arg("C"), py::arg("BE"), py::arg("P"), py::arg("dQ"), py::arg("dT"), py::arg("T"));
- //m.def("forward_kinematics", []
- //(
- // const Eigen::MatrixXd& C,
- // const Eigen::MatrixXi& BE,
- // const Eigen::MatrixXi& P,
- // std::vector<Eigen::Quaterniond, Eigen::aligned_allocator<Eigen::Quaterniond> > & dQ,
- // Eigen::MatrixXd& T
- //)
- //{
- // return igl::forward_kinematics(C, BE, P, dQ, T);
- //}, __doc_igl_forward_kinematics,
- //py::arg("C"), py::arg("BE"), py::arg("P"), py::arg("dQ"), py::arg("T"));
|