Commit bd746be0 by Justin Carpentier

### geometry: fix constructors

parent d9e2f78f
Pipeline #14623 passed with stage
in 13 minutes and 36 seconds
 ... ... @@ -97,7 +97,7 @@ namespace eigenpy typedef typename QuaternionBase::Scalar Scalar; typedef typename Quaternion::Coefficients Coefficients; typedef typename QuaternionBase::Vector3 Vector3; typedef typename Eigen::Matrix Vector4; typedef Coefficients Vector4; typedef typename QuaternionBase::Matrix3 Matrix3; typedef typename QuaternionBase::AngleAxisType AngleAxis; ... ... @@ -110,23 +110,25 @@ namespace eigenpy void visit(PyClass& cl) const { cl .def(bp::init<>(bp::arg("self"),"Default constructor")) .def(bp::init<>(bp::arg("self"),"Default constructor")[bp::return_value_policy()]) .def(bp::init((bp::arg("self"),bp::arg("R")), "Initialize from rotation matrix.\n" "\tR : a rotation matrix 3x3.")) .def(bp::init((bp::arg("self"),bp::arg("vec4")), "Initialize from a vector 4D.\n" "\tvec4 : a 4D vector representing quaternion coefficients in the order xyzw.")) "\tR : a rotation matrix 3x3.")[bp::return_value_policy()]) .def(bp::init((bp::arg("self"),bp::arg("aa")), "Initialize from an angle axis.\n" "\taa: angle axis object.")) .def(bp::init((bp::arg("self"),bp::arg("quat")), "Copy constructor.\n" "\tquat: a quaternion.")) "\tquat: a quaternion.")[bp::return_value_policy()]) .def("__init__",bp::make_constructor(&QuaternionVisitor::FromTwoVectors, bp::default_call_policies(), (bp::arg("u"),bp::arg("v"))), "Initialize from two vectors u and v") .def("__init__",bp::make_constructor(&QuaternionVisitor::FromOneVector, bp::default_call_policies(), (bp::arg("vec4"))), "Initialize from a vector 4D.\n" "\tvec4 : a 4D vector representing quaternion coefficients in the order xyzw.") .def(bp::init ((bp::arg("self"),bp::arg("w"),bp::arg("x"),bp::arg("y"),bp::arg("z")), "Initialize from coefficients.\n\n" ... ... @@ -266,6 +268,12 @@ namespace eigenpy Quaternion* q(new Quaternion); q->setFromTwoVectors(u,v); return q; } static Quaternion* FromOneVector(const Vector4& v) { Quaternion* q(new Quaternion(v)); return q; } static bool __eq__(const Quaternion & u, const Quaternion & v) { ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!