Skip to content
Snippets Groups Projects
Verified Commit 19f6b1d4 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

geometry: fix angle axis arguments

parent a5268cc2
No related branches found
No related tags found
No related merge requests found
...@@ -54,15 +54,15 @@ namespace eigenpy ...@@ -54,15 +54,15 @@ namespace eigenpy
void visit(PyClass& cl) const void visit(PyClass& cl) const
{ {
cl cl
.def(bp::init<>("Default constructor")) .def(bp::init<>(bp::arg("self"),"Default constructor"))
.def(bp::init<Scalar,Vector3> .def(bp::init<Scalar,Vector3>
((bp::arg("angle"),bp::arg("axis")), ((bp::arg("self"),bp::arg("angle"),bp::arg("axis")),
"Initialize from angle and axis.")) "Initialize from angle and axis."))
.def(bp::init<Matrix3> .def(bp::init<Matrix3>
((bp::arg("rotationMatrix")), ((bp::arg("self"),bp::arg("rotationMatrix")),
"Initialize from a rotation matrix")) "Initialize from a rotation matrix"))
.def(bp::init<Quaternion>(bp::arg("quaternion"),"Initialize from a quaternion.")) .def(bp::init<Quaternion>(bp::arg("self"),bp::arg("quaternion"),"Initialize from a quaternion."))
.def(bp::init<AngleAxis>(bp::arg("copy"),"Copy constructor.")) .def(bp::init<AngleAxis>(bp::arg("self"),bp::arg("copy"),"Copy constructor."))
/* --- Properties --- */ /* --- Properties --- */
.add_property("axis", .add_property("axis",
...@@ -74,15 +74,24 @@ namespace eigenpy ...@@ -74,15 +74,24 @@ namespace eigenpy
&AngleAxisVisitor::setAngle,"The rotation angle.") &AngleAxisVisitor::setAngle,"The rotation angle.")
/* --- Methods --- */ /* --- Methods --- */
.def("inverse",&AngleAxis::inverse,"Return the inverse rotation.") .def("inverse",&AngleAxis::inverse,
bp::arg("self"),
"Return the inverse rotation.")
.def("fromRotationMatrix",&AngleAxis::template fromRotationMatrix<Matrix3>, .def("fromRotationMatrix",&AngleAxis::template fromRotationMatrix<Matrix3>,
bp::arg("Sets *this from a 3x3 rotation matrix."),bp::return_self<>()) (bp::arg("self"),bp::arg("rot")),
.def("toRotationMatrix",&AngleAxis::toRotationMatrix,"Constructs and returns an equivalent 3x3 rotation matrix.") "Sets *this from a 3x3 rotation matrix",
.def("matrix",&AngleAxis::matrix,"Returns an equivalent rotation matrix.") bp::return_self<>())
.def("toRotationMatrix",
bp::arg("self"),
&AngleAxis::toRotationMatrix,
"Constructs and returns an equivalent 3x3 rotation matrix.")
.def("matrix",&AngleAxis::matrix,
bp::arg("self"),
"Returns an equivalent rotation matrix.")
.def("isApprox", .def("isApprox",
&call<AngleAxis>::isApprox, &call<AngleAxis>::isApprox,
isApproxAngleAxis_overload(bp::args("other","prec"), isApproxAngleAxis_overload(bp::args("self","other","prec"),
"Returns true if *this is approximately equal to other, within the precision determined by prec.")) "Returns true if *this is approximately equal to other, within the precision determined by prec."))
/* --- Operators --- */ /* --- Operators --- */
...@@ -125,7 +134,7 @@ namespace eigenpy ...@@ -125,7 +134,7 @@ namespace eigenpy
static void expose() static void expose()
{ {
bp::class_<AngleAxis>("AngleAxis", bp::class_<AngleAxis>("AngleAxis",
"AngleAxis representation of rotations.\n\n", "AngleAxis representation of a rotation.\n\n",
bp::no_init) bp::no_init)
.def(AngleAxisVisitor<AngleAxis>()); .def(AngleAxisVisitor<AngleAxis>());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment