open3d.visualization.gui.Application¶
-
class
open3d.visualization.gui.
Application
¶ Global application singleton. This owns the menubar, windows, and event loop
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
add_font
(self: open3d.cpu.pybind.visualization.gui.Application, arg0: open3d.cpu.pybind.visualization.gui.FontDescription) → int¶ Adds a font. Must be called after initialize() and before a window is created. Returns the font id, which can be used to change the font in widgets such as Label which support custom fonts.
-
add_window
(self: open3d.cpu.pybind.visualization.gui.Application, arg0: open3d::visualization::gui::Window) → None¶ Adds a window to the application. This is only necessary when creating object that is a Window directly, rather than with create_window
-
create_window
(self: open3d.cpu.pybind.visualization.gui.Application, title: str = '', width: int = - 1, height: int = - 1, x: int = - 1, y: int = - 1, flags: int = 0) → open3d::visualization::gui::PyWindow¶ Creates a window and adds it to the application. To programmatically destroy the window do window.close().Usage: create_window(title, width, height, x, y, flags). x, y, and flags are optional.
-
initialize
(*args, **kwargs)¶ Overloaded function.
initialize(self: open3d.cpu.pybind.visualization.gui.Application) -> None
Initializes the application, using the resources included in the wheel. One of the initialize functions _must_ be called prior to using anything in the gui module
initialize(self: open3d.cpu.pybind.visualization.gui.Application, arg0: str) -> None
Initializes the application with location of the resources provided by the caller. One of the initialize functions _must_ be called prior to using anything in the gui module
-
post_to_main_thread
(self: open3d.cpu.pybind.visualization.gui.Application, arg0: open3d::visualization::gui::Window, arg1: Callable[[], None]) → None¶ Runs the provided function on the main thread. This can be used to execute UI-related code at a safe point in time. If the UI changes, you will need to manually request a redraw of the window with w.post_redraw()
-
quit
(self: open3d.cpu.pybind.visualization.gui.Application) → None¶ Closes all the windows, exiting as a result
-
render_to_image
(self: open3d.cpu.pybind.visualization.gui.Application, arg0: open3d.cpu.pybind.visualization.rendering.Open3DScene, arg1: int, arg2: int) → open3d.cpu.pybind.geometry.Image¶ Renders a scene to an image and returns the image. If you are rendering without a visible window you should use open3d.visualization.rendering.RenderToImage instead
-
run
(self: open3d.cpu.pybind.visualization.gui.Application) → None¶ Runs the event loop. After this finishes, all windows and widgets should be considered uninitialized, even if they are still held by Python variables. Using them is unsafe, even if run() is called again.
-
run_in_thread
(self: open3d.cpu.pybind.visualization.gui.Application, arg0: Callable[], None]) → None¶ Runs function in a separate thread. Do not call GUI functions on this thread, call post_to_main_thread() if this thread needs to change the GUI.
-
run_one_tick
(self: open3d.cpu.pybind.visualization.gui.Application) → bool¶ Runs the event loop once, returns True if the app is still running, or False if all the windows have closed or quit() has been called.
-
set_font
(self: open3d.cpu.pybind.visualization.gui.Application, arg0: int, arg1: open3d.cpu.pybind.visualization.gui.FontDescription) → None¶ Changes the contents of an existing font, for instance, the default font.
-
DEFAULT_FONT_ID
= 0¶
-
instance
= Application singleton instance¶
The Menu for the application (initially None)
-
property
now
¶ Returns current time in seconds
-
property
resource_path
¶ Returns a string with the path to the resources directory
-