This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Rotation2D lacks 0-argument constructor

Tags: None
(comma "," separated)
User avatar
alecjacobson
Registered Member
Posts
26
Karma
0
Code: Select all
#include <Eigen/Geometry>

int main(int argc,char * argv[])
{
  Eigen::Rotation2Dd r;
}


gives a compiler error:
Code: Select all
error: no matching constructor for initialization of 'Eigen::Rotation2Dd'
      (aka 'Rotation2D<double>')
  Eigen::Rotation2Dd r;


Obviously I can fix this with:
Code: Select all
Eigen::Rotation2Dd r(0);


But the lack of a 0-argument constructor makes it tedious to include Rotation2D objects in stl containers or classes. Was there a good reason for not including such a constructor?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
No good reason, it's just that its primary purpose is to create 2D rotation matrices from a given angle, and not to be actually stored.

Fixed in default and 3.2 branches.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]