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

@@ -79,6 +79,13 @@ void Placement::fromMatrix(const Base::Matrix4D& matrix)
this->_pos.z = matrix[2][3];
}
bool Placement::isIdentity() const
{
Base::Vector3d nullvec(0,0,0);
bool none = (this->_pos == nullvec) && (this->_rot.isIdentity());
return none;
}
void Placement::invert()
{
this->_rot = this->_rot.inverse();