http://bitbucket.org/eigen/eigen/issue/112/lookat-matrix
Could you please make the issue tracker public? (otherwise I get "This repository does not have issue tracking enabled.")
We initially had our bugtracker on bitbucket, but we rapidly switched to bugzilla. But nowadays the old bugtracker does not exist at all, so these link are lost. Anyway, the title of the is bug entry is quite self explanatory.
Thanks - saw there was recent bugzilla activity for this so thought the other must have been live still.
There is an implementation for the 3d case in this pull-request: https://bitbucket.org/eigen/eigen/pull-request/43/openglsupport-tweaks-for-opengl-30/diff#Lunsupported/Eigen/OpenGLSupportT240 Do we need an implementation for arbitrary dimensions? At least 2d might be interesting in some cases. For 3d, we could essentially copy that implementation (using an appropriate function header and return type).
I'd rather make it a member of the Transform class, with a simpler implementation like (quick copy-past from my camera class): Matrix<Scalar,3,3> R; R.col(2) = (position-target).normalized(); R.col(0) = up.cross(R.col(2)).normalized(); R.col(1) = R.col(2).cross(R.col(0)); view_matrix.topLeftCorner<3,3>() = R.transpose(); view_matrix.topRightCorner<3,1>() = -R.transpose() * position; view_matrix.row(3) << 0, 0, 0, 1;
Yes, the implementation of the pull-request is a bit over-complicated. I'm OK with your implementation, also with adding it to Transform, instead of a stand-alone method.
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/17.