From 890bc90b0cf4d1ed26aba7d8cbfbe56da138b7e7 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Mon, 30 Sep 2019 13:41:58 +0800 Subject: [PATCH] Base: add RotationPy.RawAxis Expose rotation raw axis --- src/Base/RotationPy.xml | 6 ++++++ src/Base/RotationPyImp.cpp | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/Base/RotationPy.xml b/src/Base/RotationPy.xml index 16b492004ecf..9e30199cf673 100644 --- a/src/Base/RotationPy.xml +++ b/src/Base/RotationPy.xml @@ -110,6 +110,12 @@ + + + The rotation axis without normalization + + + The rotation angle of the quaternion diff --git a/src/Base/RotationPyImp.cpp b/src/Base/RotationPyImp.cpp index 9c16034275d2..f144a5716f4f 100644 --- a/src/Base/RotationPyImp.cpp +++ b/src/Base/RotationPyImp.cpp @@ -320,6 +320,13 @@ void RotationPy::setQ(Py::Tuple arg) this->getRotationPtr()->setValue(q0,q1,q2,q3); } +Py::Object RotationPy::getRawAxis(void) const +{ + Base::Vector3d axis; double angle; + this->getRotationPtr()->getRawValue(axis, angle); + return Py::Vector(axis); +} + Py::Object RotationPy::getAxis(void) const { Base::Vector3d axis; double angle;