rename Placement.isNull to Placement.isIdentity

implement Rotation.isNull and Rotation.isIdentity
This commit is contained in:
wmayer
2017-12-13 16:58:12 +01:00
parent 77174809db
commit df0a3ded78
6 changed files with 33 additions and 11 deletions

View File

@@ -282,13 +282,19 @@ PyObject* RotationPy::isSame(PyObject *args)
return Py_BuildValue("O", (same ? Py_True : Py_False));
}
PyObject* RotationPy::isIdentity(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
bool null = getRotationPtr()->isIdentity();
return Py_BuildValue("O", (null ? Py_True : Py_False));
}
PyObject* RotationPy::isNull(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Base::Rotation rot = * getRotationPtr();
Base::Rotation nullrot(0,0,0,1);
bool null = rot.isSame(nullrot);
bool null = getRotationPtr()->isNull();
return Py_BuildValue("O", (null ? Py_True : Py_False));
}