add method Placement::isIdentity

This commit is contained in:
wmayer
2018-09-05 21:19:16 +02:00
parent 363de2f7da
commit 79938b119f
3 changed files with 10 additions and 5 deletions

View File

@@ -204,11 +204,8 @@ PyObject* PlacementPy::isIdentity(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Base::Vector3d nullvec(0,0,0);
Base::Vector3d pos = getPlacementPtr()->getPosition();
Base::Rotation rot = getPlacementPtr()->getRotation();
bool null = (pos == nullvec) && (rot.isIdentity());
return Py_BuildValue("O", (null ? Py_True : Py_False));
bool none = getPlacementPtr()->isIdentity();
return Py_BuildValue("O", (none ? Py_True : Py_False));
}
Py::Object PlacementPy::getBase(void) const