Verified Commit 30bd0c65 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

geometry: fix quaternion static Identity constructor

parent b55c10dd
Pipeline #14610 passed with stage
in 19 minutes and 58 seconds
......@@ -234,8 +234,9 @@ namespace eigenpy
"Returns the quaternion which transforms a into b through a rotation.",
bp::return_value_policy<bp::manage_new_object>())
.staticmethod("FromTwoVectors")
.def("Identity",&Quaternion::Identity,
"Returns a quaternion representing an identity rotation.")
.def("Identity",&Identity,
"Returns a quaternion representing an identity rotation.",
bp::return_value_policy<bp::manage_new_object>())
.staticmethod("Identity")
;
}
......@@ -254,6 +255,12 @@ namespace eigenpy
static Quaternion & assign(Quaternion & self, const OtherQuat & quat)
{ return self = quat; }
static Quaternion* Identity()
{
Quaternion* q(new Quaternion); q->setIdentity();
return q;
}
static Quaternion* FromTwoVectors(const Vector3& u, const Vector3& v)
{
Quaternion* q(new Quaternion); q->setFromTwoVectors(u,v);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment