expose Placement.slerp to Python
This commit is contained in:
@@ -114,6 +114,18 @@ Placement(Base, Axis, Angle) -- define position and rotation
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="slerp" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
slerp(placement2, t, shorten = True): interpolate between self and placement2.
|
||||
This function performs independent interpolation of rotation and movement.
|
||||
Result of such interpolation might be not what application expects, thus this
|
||||
tool might be considered for simple cases or for interpolating between small intervals.
|
||||
|
||||
For more complex cases you better use the advanced sclerp() function.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isIdentity" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
|
||||
@@ -252,6 +252,17 @@ PyObject* PlacementPy::sclerp(PyObject* args)
|
||||
return new PlacementPy(new Placement(ret));
|
||||
}
|
||||
|
||||
PyObject* PlacementPy::slerp(PyObject* args)
|
||||
{
|
||||
PyObject* pyplm2;
|
||||
double t;
|
||||
if (!PyArg_ParseTuple(args, "O!d", &(PlacementPy::Type), &pyplm2, &t))
|
||||
return nullptr;
|
||||
Base::Placement plm2 = static_cast<Base::PlacementPy*>(pyplm2)->value();
|
||||
Base::Placement ret = Base::Placement::slerp(*getPlacementPtr(), plm2, t);
|
||||
return new PlacementPy(new Placement(ret));
|
||||
}
|
||||
|
||||
PyObject* PlacementPy::isIdentity(PyObject *args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
|
||||
Reference in New Issue
Block a user