Moved definition of the static Transform::getIdentity() method in header file in order to fix issue 5

This commit is contained in:
Mathieu Labbe
2015-01-09 13:42:02 -05:00
parent 05ee9a7b84
commit 21dc506f82
2 changed files with 4 additions and 8 deletions

View File

@@ -96,7 +96,10 @@ public:
bool operator==(const Transform & t) const; bool operator==(const Transform & t) const;
bool operator!=(const Transform & t) const; bool operator!=(const Transform & t) const;
static Transform getIdentity(); static Transform getIdentity()
{
return Transform(1,0,0,0, 0,1,0,0, 0,0,1,0);
}
private: private:
std::vector<float> data_; std::vector<float> data_;

View File

@@ -131,13 +131,6 @@ void Transform::setIdentity()
*this = getIdentity(); *this = getIdentity();
} }
Transform Transform::getIdentity()
{
return Transform(1,0,0,0,
0,1,0,0,
0,0,1,0);
}
Transform Transform::inverse() const Transform Transform::inverse() const
{ {
Eigen::Matrix4f m = util3d::transformToEigen4f(*this); Eigen::Matrix4f m = util3d::transformToEigen4f(*this);