mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Moved definition of the static Transform::getIdentity() method in header file in order to fix issue 5
This commit is contained in:
@@ -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_;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user