Registered Member
|
Hello,
I would like to declare an array based on Eigen::Quaternionf. The more I pull on what I need to forward declare from Eigen in order to do so, the more I have to forward declare and it is becoming heavy to handle. I currently have:
AutoAlign is yet to be forward declared in this code, but it is already becoming unmanageable as is... Is there a smart way to handle this? Thanks Antoine. PS: I am not even sure the default argument for template parameter 'Options' is 'AutoAlign', does anyone confirm? |
Moderator
|
Because Eigen is so heavily templated, it will be difficult to forward declare it. Just include Eigen/Geometry in your header. A very long time ago, we tried to define a ForwardDeclare header for Eigen, but the gain in term of compilation speed was negligible, so we gave up. Precompiled-header are much more effective.
|
Moderator
|
Well, for Quaternion, the following should do the job though:
template<typename _Scalar, int Options = 0> class Quaternion; Whenever possible, we make sure that optional parameters default to 0. |
Registered Member
|
|
Registered Member
|
Hum, and for the multiple definitions, what do you advise me? There is not much else than ignoring the warnings I guess?
Thanks. |
Moderator
|
|
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]