This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 17 - "lookat" matrix
Summary: "lookat" matrix
Status: CONFIRMED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Geometry (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Low Feature Request
Assignee: Gael Guennebaud
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-03 23:44 UTC by Benoit Jacob
Modified: 2019-12-04 09:30 UTC (History)
2 users (show)



Attachments

Comment 1 deanna.m.hood 2015-03-12 17:24:54 UTC
Could you please make the issue tracker public? (otherwise I get "This repository does not have issue tracking enabled.")
Comment 2 Gael Guennebaud 2015-03-12 23:26:31 UTC
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.
Comment 3 deanna.m.hood 2015-03-12 23:47:46 UTC
Thanks - saw there was recent bugzilla activity for this so thought the other must have been live still.
Comment 4 Christoph Hertzberg 2015-03-13 00:01:46 UTC
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).
Comment 5 Gael Guennebaud 2015-03-13 09:29:06 UTC
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;
Comment 6 Christoph Hertzberg 2015-03-13 14:01:28 UTC
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.
Comment 7 Nobody 2019-12-04 09:30:44 UTC
-- 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.

Note You need to log in before you can comment on or make changes to this bug.