Clarify various ways to open a visualizer and some API inconsistencies
- 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
Hi, I would like to understand the rationale behind `draw` vs. `draw_geometries` vs. `Visualizer` vs. `O3DVisualizer` vs. `SceneWidget`+`Open3DScene`, and to ask about some inconsistencies I see between them...
If I understand correctly, as of version 0.16.0:
* [`draw_geometries`](http://www.open3d.org/docs/0.16.0/python_api/open3d.visualization.draw_geometries.html) and its variants are the simplest ways of viewing/rendering geometries, with a single function call, in a stand-alone single window, without menu nor settings controls, but with mouse manipulation and with keyboard shortcuts.
* [`draw`](http://www.open3d.org/docs/0.16.0/python_api/open3d.visualization.draw.html) brings up a single-window application with a scene viewer and a standard settings pane (including lighting, etc.), with standard mouse control, but **without** keyboard shortcuts.
* [`o3d.visualization.Visualizer`](http://www.open3d.org/docs/0.16.0/python_api/open3d.visualization.Visualizer.html) and its variants are stand-alone, single-window visualizers similar to `draw_geometries` (without menu, without settings pane). In addition to predefined keyboard and mouse functionality, they allow to modify the `ViewControl` and the `RenderOption` objects, obtained respectively through the `get_view_control` and `get_render_option` methods. They also have an `update_geometry` method.
* [`o3d.visualization.O3DVisualizer`](http://www.open3d.org/docs/0.16.0/python_api/open3d.visualization.O3DVisualizer.html) on one hand, and [`o3d.visualization.gui.SceneWidget`](http://www.open3d.org/docs/0.16.0/python_api/open3d.visualization.gui.SceneWidget.html) in conjunction with [`o3d.visualization.rendering.Open3DScene`](http://www.open3d.org/docs/0.16.0/python_api/open3d.visualization.rendering.Open3DScene.html) on the other hand, are two ways ("low-level" and "high-level" according to the [text3d example](http://www.open3d.org/docs/0.16.0/python_example/visualization/index.html#text3d-py)) of having a visualizer within an `o3d.gui.Application`, similar to `draw`, allowing to define all the other widgets in the application (the menus, the settings, etc.) and to manipulate the scene as well.
So, the way I see it:
* in _appearance and behavior of keyboard_, `draw_geometries` and `Visualizer` are similar to each other on one hand, while `draw`, `O3DVisualizer` and `SceneWidget`+`Open3DScene` are similar to one another on the other hand.
* in usage, `draw` and `draw_geometries` are similar, while `Visualizer`, `O3DVisualizer` and `SceneWidget`+`Open3DScene` are each used somewhat differently...
**My questions are:**
1. Why are the keyboard shortcuts active only for the stand-alone visualizer (`draw_geometries` and `Visualizer`) and not in the visualizer embedded within an `o3d.gui.Application` window?
2. Why doesn't `O3DVisualizer` nor either `SceneWidget` or `Open3DScene` provide access to the `ViewControl` and `RenderOption` objects like `Visualizer` does, to allow modifying them?
3. Why does `Visualizer` have a generic [`update_geometry`]
(http://www.open3d.org/docs/0.16.0/python_api/open3d.visualization.Visualizer.html?highlight=update_geometry#open3d.visualization.Visualizer.update_geometry) method, while `O3DVisualizer` and `Open3DScene`'s `scene` property have an `update_geometry` method that applies **only for `PointCloud`** (respectively [here](http://www.open3d.org/docs/0.16.0/python_api/open3d.visualization.O3DVisualizer.html?highlight=update_geometry#open3d.visualization.O3DVisualizer.update_geometry) and [here](http://www.open3d.org/docs/0.16.0/python_api/open3d.visualization.rendering.Scene.html?highlight=update_geometry#open3d.visualization.rendering.Scene.update_geometry))?
4. Are the two distinct ways of defining a visualizer within the `o3d.gui.Application`, namely `O3DVisualizer` and `SceneWidget`+`Open3DVisualizer`, really necessary?
As a side note, I would like to point out that when using the `SceneWidget`+`Open3DScene` combination, there are three distinct levels which are all referred to as "scene", as exemplified in this code:
```python
import open3d as o3d
import open3d.visualization.gui as gui
import open3d.visualization.rendering as rendering
gui.Application.instance.initialize()
window = gui.Application.instance.create_window(
"Sample window", 1024, 768)
scene = gui.SceneWidget()
scene.scene = rendering.Open3DScene(window.renderer) # The o3d.rendering.Open3DScene that the SceneWidget renders
scene.scene.scene # "The low-level o3d.rendering.Scene object (read-only)" (!!!)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.