File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -234,8 +234,9 @@ namespace eigenpy
234234 " Returns the quaternion which transforms a into b through a rotation." ,
235235 bp::return_value_policy<bp::manage_new_object>())
236236 .staticmethod (" FromTwoVectors" )
237- .def (" Identity" ,&Quaternion::Identity,
238- " Returns a quaternion representing an identity rotation." )
237+ .def (" Identity" ,&Identity,
238+ " Returns a quaternion representing an identity rotation." ,
239+ bp::return_value_policy<bp::manage_new_object>())
239240 .staticmethod (" Identity" )
240241 ;
241242 }
@@ -254,6 +255,12 @@ namespace eigenpy
254255 static Quaternion & assign (Quaternion & self, const OtherQuat & quat)
255256 { return self = quat; }
256257
258+ static Quaternion* Identity ()
259+ {
260+ Quaternion* q (new Quaternion); q->setIdentity ();
261+ return q;
262+ }
263+
257264 static Quaternion* FromTwoVectors (const Vector3& u, const Vector3& v)
258265 {
259266 Quaternion* q (new Quaternion); q->setFromTwoVectors (u,v);
You can’t perform that action at this time.
0 commit comments