+ allow to modify placement via sub-attributes
This commit is contained in:
parent
351ad4f6c7
commit
52dc0dda47
|
@ -72,13 +72,13 @@
|
|||
</Documentation>
|
||||
<Parameter Name="Q" Type="Tuple" />
|
||||
</Attribute>
|
||||
<Attribute Name="Axis" ReadOnly="true">
|
||||
<Attribute Name="Axis" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>The rotation axis of the quaternion</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Axis" Type="Object" />
|
||||
</Attribute>
|
||||
<Attribute Name="Angle" ReadOnly="true">
|
||||
<Attribute Name="Angle" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>The rotation angle of the quaternion</UserDocu>
|
||||
</Documentation>
|
||||
|
|
|
@ -197,6 +197,14 @@ Py::Object RotationPy::getAxis(void) const
|
|||
return Py::Vector(axis);
|
||||
}
|
||||
|
||||
void RotationPy::setAxis(Py::Object arg)
|
||||
{
|
||||
Base::Vector3d axis; double angle;
|
||||
this->getRotationPtr()->getValue(axis, angle);
|
||||
axis = Py::Vector(arg).toVector();
|
||||
this->getRotationPtr()->setValue(axis, angle);
|
||||
}
|
||||
|
||||
Py::Float RotationPy::getAngle(void) const
|
||||
{
|
||||
Base::Vector3d axis; double angle;
|
||||
|
@ -204,6 +212,14 @@ Py::Float RotationPy::getAngle(void) const
|
|||
return Py::Float(angle);
|
||||
}
|
||||
|
||||
void RotationPy::setAngle(Py::Float arg)
|
||||
{
|
||||
Base::Vector3d axis; double angle;
|
||||
this->getRotationPtr()->getValue(axis, angle);
|
||||
angle = static_cast<double>(arg);
|
||||
this->getRotationPtr()->setValue(axis, angle);
|
||||
}
|
||||
|
||||
PyObject *RotationPy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user