Skip to content

Commit

Permalink
Base: add RotationPy.RawAxis
Browse files Browse the repository at this point in the history
Expose rotation raw axis
  • Loading branch information
realthunder authored and wwmayer committed Oct 7, 2019
1 parent 533bbf8 commit 890bc90
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Base/RotationPy.xml
Expand Up @@ -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>
Expand Down
7 changes: 7 additions & 0 deletions src/Base/RotationPyImp.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 890bc90

Please sign in to comment.