Base: add RotationPy.RawAxis

Expose rotation raw axis
This commit is contained in:
Zheng, Lei
2019-09-30 13:41:58 +08:00
committed by wmayer
parent 533bbf8a8c
commit 890bc90b0c
2 changed files with 13 additions and 0 deletions

View File

@@ -110,6 +110,12 @@
</Documentation>
<Parameter Name="Axis" Type="Object" />
</Attribute>
<Attribute Name="RawAxis" ReadOnly="true">
<Documentation>
<UserDocu>The rotation axis without normalization</UserDocu>
</Documentation>
<Parameter Name="RawAxis" Type="Object" />
</Attribute>
<Attribute Name="Angle" ReadOnly="false">
<Documentation>
<UserDocu>The rotation angle of the quaternion</UserDocu>

View File

@@ -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;