isl-org / isl-org/Open3D

How to set the direction vectors in gui.SceneWidget().scene.camera.look_at(center, eye, up)?

Open
#5,386 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### My Question

There are two questions which I‘m very confused.

1. If I use **o3d.geometry.get_rotation_matrix_from_quaternion(quaternion)** method to get **rotation matrix**, the quaternion composed by [ox, oy, oz, ow] or [ow, ox, oy, oz]? And the single colomn(or single row) of rotation matrix represent which direction vector?
2. If I want to use rotation matrix to set camera view, what means of center/eye/up vector in gui.SceneWidget().scene.camera.look_at(center, eye, up) python interface? I check the C++ code, and only find [this](https://github.com/isl-org/Open3D/blob/c3dfcbdc8d7cdf5603367b783b6d4a43fc934bd5/cpp/open3d/visualization/utility/GLHelper.cpp#:~:text=GLMatrix4f-,LookAt,-(const%20Eigen%3A%3AVector3d), but I can't understand the means of code.

It will be great if anyone can help to provide relevant instructions.
Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.