Registered Member
|
Hi I am new to Eigen,
I am trying to make it compatible with my game engine. I am looking for advice if this is the most efficient way of extending matrices. I read http://eigen.tuxfamily.org/dox/TopicCustomizingEigen.html This is my approach to lerp:
If I try it less general I get some conversion errors:
I also tried wrapping some of the functions to use the same names as I am already using like dot to dotProduct.
Can you give a few more examples how to properly add new functions ,wrapping existing and add new conversions. Thanks in advance, Alex |
Moderator
|
You cannot return a MatrixBase<T> object, it is like an abstract base class, so you cannot create an object of such a type. Make lerp return a PlainObject. This is a typedef to the right Matrix<> type. It is defined in MatrixBase so you can directly use it.
|
Registered Member
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]