[eigen] UnalignedArrayAssert...

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


I am lost with all the assert failures.

I am using a 2x2 double matrix in such a class construct:

#include <Core>
USING_PART_OF_NAMESPACE_EIGEN
typedef Matrix<double,2,2> MatrixABCD;

class ABCDPrivate
{
public:
   MatrixABCD matrix;

public:
 // necessary for EIGEN Libary
 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};

ABCD::ABCD()
   : d(new ABCDPrivate)
{
   d->matrix.setIdentity();
}


this now seems to work.

But then it fails here: ( Lens is derived public from ABCD)
void Lens::setFocalLength(double focallength)
{
   m_FocalLength = focallength;

   MatrixABCD matrix; <<--- failure
   matrix << 1.0 , 0.0, -1.0/m_FocalLength   , 1.0;

   setMatrix(matrix);
}

why?

also I am using the class ABCD in a std::vector do I need to take special care of that?

This class collection is part of a workshop (next week) on programming for physicists and I wanted to use a decent matrix class instead of a simple self written class (which would be much easier to use
and understand).

Matthias



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/