open3d.visualization.gui.SceneWidget¶
-
class
open3d.visualization.gui.
SceneWidget
¶ Displays 3D content
-
class
Controls
¶ Enum class describing mouse interaction.
-
FLY
= Controls.FLY¶
-
PICK_POINTS
= Controls.PICK_POINTS¶
-
ROTATE_CAMERA
= Controls.ROTATE_CAMERA¶
-
ROTATE_IBL
= Controls.ROTATE_IBL¶
-
ROTATE_MODEL
= Controls.ROTATE_MODEL¶
-
ROTATE_SUN
= Controls.ROTATE_SUN¶
-
-
class
EventCallbackResult
¶ Returned by event handlers
Members:
IGNORED : Event handler ignored the event, widget will handle event normally
HANDLED : Event handler handled the event, but widget will still handle the event normally. This is useful when you are augmenting base functionality
CONSUMED : Event handler consumed the event, event handling stops, widget will not handle the event. This is useful when you are replacing functionality
-
CONSUMED
= EventCallbackResult.CONSUMED¶
-
HANDLED
= EventCallbackResult.HANDLED¶
-
IGNORED
= EventCallbackResult.IGNORED¶
-
-
__init__
(self: open3d.cpu.pybind.visualization.gui.SceneWidget) → None¶ Creates an empty SceneWidget. Assign a Scene with the ‘scene’ property
-
add_3d_label
(self: open3d.cpu.pybind.visualization.gui.SceneWidget, arg0: numpy.ndarray[float32[3, 1]], arg1: str) → open3d.cpu.pybind.visualization.gui.Label3D¶ Add a 3D text label to the scene. The label will be anchored at the specified 3D point.
-
add_child
(self: open3d.cpu.pybind.visualization.gui.Widget, arg0: open3d.cpu.pybind.visualization.gui.Widget) → None¶ Adds a child widget
-
calc_preferred_size
(self: open3d.cpu.pybind.visualization.gui.Widget, arg0: open3d.cpu.pybind.visualization.gui.Theme) → open3d.cpu.pybind.visualization.gui.Size¶ Returns the preferred size of the widget. This is intended to be called only during layout, although it will also work during drawing. Calling it at other times will not work, as it requires some internal setup in order to function properly
-
enable_scene_caching
(self: open3d.cpu.pybind.visualization.gui.SceneWidget, arg0: bool) → None¶ Enable/Disable caching of scene content when the view or model is not changing. Scene caching can help improve UI responsiveness for large models and point clouds
-
force_redraw
(self: open3d.cpu.pybind.visualization.gui.SceneWidget) → None¶ Ensures scene redraws even when scene caching is enabled.
-
get_children
(self: open3d.cpu.pybind.visualization.gui.Widget) → List[open3d.cpu.pybind.visualization.gui.Widget]¶ Returns the array of children. Do not modify.
-
remove_3d_label
(self: open3d.cpu.pybind.visualization.gui.SceneWidget, arg0: open3d.cpu.pybind.visualization.gui.Label3D) → None¶ Removes the 3D text label from the scene
-
set_on_key
(self: open3d.cpu.pybind.visualization.gui.SceneWidget, arg0: Callable[[open3d.cpu.pybind.visualization.gui.KeyEvent], int]) → None¶ Sets a callback for key events. This callback is passed a KeyEvent object. The callback must return EventCallbackResult.IGNORED, EventCallbackResult.HANDLED, or EventCallackResult.CONSUMED.
-
set_on_mouse
(self: open3d.cpu.pybind.visualization.gui.SceneWidget, arg0: Callable[[open3d.cpu.pybind.visualization.gui.MouseEvent], int]) → None¶ Sets a callback for mouse events. This callback is passed a MouseEvent object. The callback must return EventCallbackResult.IGNORED, EventCallbackResult.HANDLED, or EventCallackResult.CONSUMED.
-
set_on_sun_direction_changed
(self: open3d.cpu.pybind.visualization.gui.SceneWidget, arg0: Callable[[numpy.ndarray[float32[3, 1]]], None]) → None¶ Callback when user changes sun direction (only called in ROTATE_SUN control mode). Called with one argument, the [i, j, k] vector of the new sun direction
-
set_view_controls
(self: open3d.cpu.pybind.visualization.gui.SceneWidget, arg0: open3d.cpu.pybind.visualization.gui.SceneWidget.Controls) → None¶ Sets mouse interaction, e.g. ROTATE_OBJ
-
setup_camera
(self: open3d.cpu.pybind.visualization.gui.SceneWidget, arg0: float, arg1: open3d.cpu.pybind.geometry.AxisAlignedBoundingBox, arg2: numpy.ndarray[float32[3, 1]]) → None¶ Configure the camera: setup_camera(field_of_view, model_bounds, center_of_rotation)
-
CONSUMED
= EventCallbackResult.CONSUMED¶
-
FLY
= Controls.FLY¶
-
HANDLED
= EventCallbackResult.HANDLED¶
-
IGNORED
= EventCallbackResult.IGNORED¶
-
PICK_POINTS
= Controls.PICK_POINTS¶
-
ROTATE_CAMERA
= Controls.ROTATE_CAMERA¶
-
ROTATE_IBL
= Controls.ROTATE_IBL¶
-
ROTATE_MODEL
= Controls.ROTATE_MODEL¶
-
ROTATE_SUN
= Controls.ROTATE_SUN¶
-
property
enabled
¶ True if widget is enabled, False if disabled
-
property
frame
¶ The widget’s frame. Setting this value will be overridden if the frame is within a layout.
-
property
scene
¶ The rendering.Open3DScene that the SceneWidget renders
-
property
visible
¶ True if widget is visible, False otherwise
-
class