You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reviewing #324 and #325, I noticed we have a circular dependency between Quaternion and Matrix3. Both classes have a constructor that takes the other:
I don't think this is causing any big issues, but I thought I'd document it on a ticket in case we run into problems in the future. At the very least, it causes 🐔 and 🥚 issues like we're seeing now when creating python bindings: we can't fully create bindings for one class without the other.
If we have to choose one direction to keep, I'd suggest removing Quaternion(const Matrix3<T> &_mat) and instead offering a function like Matrix3::AsQuaternion(), because I think of Quaternions as lower level than Matrix3s.
The text was updated successfully, but these errors were encountered:
I'm not sure if this is necessary. It seems like the problem is that the python bindings for Matrix3 and Quaternion were in different PRs. Having the circular dependency forces us to have to implement the bindings at the same time, but I don't think it's problematic enough to remove functionality from either of the classes, i.e, choosing only one direction.
Environment
Description
While reviewing #324 and #325, I noticed we have a circular dependency between
Quaternion
andMatrix3
. Both classes have a constructor that takes the other:https://github.com/ignitionrobotics/ign-math/blob/2b0f9a4e8020ae9a0cfcf045176807f114cb6231/include/ignition/math/Matrix3.hh#L86-L88
https://github.com/ignitionrobotics/ign-math/blob/2b0f9a4e8020ae9a0cfcf045176807f114cb6231/include/ignition/math/Quaternion.hh#L87-L90
I don't think this is causing any big issues, but I thought I'd document it on a ticket in case we run into problems in the future. At the very least, it causes 🐔 and 🥚 issues like we're seeing now when creating python bindings: we can't fully create bindings for one class without the other.
If we have to choose one direction to keep, I'd suggest removing
Quaternion(const Matrix3<T> &_mat)
and instead offering a function likeMatrix3::AsQuaternion()
, because I think ofQuaternion
s as lower level thanMatrix3
s.The text was updated successfully, but these errors were encountered: