expose Roation.slerp to Python
This commit is contained in:
@@ -73,6 +73,14 @@
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="slerp" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
slerp(Rotation, Float) -> Rotation
|
||||
Spherical linear interpolation of this and a given rotation. The float must be in the range of 0 and 1
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="toEuler" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
|
||||
@@ -256,6 +256,18 @@ PyObject* RotationPy::multVec(PyObject * args)
|
||||
return new VectorPy(new Vector3d(vec));
|
||||
}
|
||||
|
||||
PyObject* RotationPy::slerp(PyObject * args)
|
||||
{
|
||||
PyObject *rot;
|
||||
double t;
|
||||
if (!PyArg_ParseTuple(args, "O!d", &(RotationPy::Type), &rot, &t))
|
||||
return 0;
|
||||
Rotation *rot0 = this->getRotationPtr();
|
||||
Rotation *rot1 = static_cast<RotationPy*>(rot)->getRotationPtr();
|
||||
Rotation sl = Rotation::slerp(*rot0, *rot1, t);
|
||||
return new RotationPy(new Rotation(sl));
|
||||
}
|
||||
|
||||
PyObject* RotationPy::toEuler(PyObject * args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
|
||||
Reference in New Issue
Block a user