I'm using the Eigen Library here: http://eigen.tuxfamily.org/index.php?title=Main_Page
When trying to compile this, it returns
error: expected constructor, destructor, or type conversion before '.'
complaining about the lines where i add the xaxis...zaxis to the matrix. is it possible it's because gcc4.3 (which is the compiler i'm using) doesn't like this type of initialization because the dot usually is a function call (which wouldn't work on an uninitialized object)?
but to me it seems to follow exactly the tutorial example here: http://eigen.tuxfamily.org/dox/TutorialAdvancedInitialization.html , except for the static, but the error is the same without it. I tried using the comma separated initialization but again it's the same.
// axis system
static Eigen::Matrix<double, 3, 1> s_xAxis(1.,0.,0.); //!< global x Axis;
static Eigen::Matrix<double, 3, 1> s_yAxis(0.,1.,0.); //!< global y Axis;
static Eigen::Matrix<double, 3, 1> s_zAxis(0.,0.,1.); //!< global z Axis;
// origin
static Eigen::Matrix<double, 3, 1> s_origin(0.,0.,0.); //!< origin position
static Eigen::Matrix<double, 3,3> s_idRotationZinverse;
s_idRotationZinverse.col(0) << s_yAxis;
s_idRotationZinverse.col(1) << s_xAxis;
s_idRotationZinverse.col(2) << -s_zAxis;
1.actually valid syntax (as opposed to1.0)? The compiler complaint comes right where you would but the0. - Matt Phillipsstatic Eigen::Matrix<double, 3, 1> s_xAxis; s_xAxis << 1., 0., 0.;using<<to initialize the variable. - Jonathan Leffler