open3d.visualization.O3DVisualizer#

class open3d.visualization.O3DVisualizer#

Visualization object used by draw()

class DrawObject#

Information about an object that is drawn. Do not modify this, it can lead to unexpected results.

__init__(*args, **kwargs)#
property geometry#

The geometry. Modifying this will not result in any visible change. Use remove_geometry() and then add_geometry()to change the geometry

property group#

The group that the object belongs to

property is_visible#

True if the object is checked in the list. If the object’s group is unchecked or an animation is playing, the object’s visibility may not correspond with this value

property name#

The name of the object

property time#

The object’s timestamp

class Shader#

Scene-level rendering options

Members:

STANDARD : Pixel colors from standard lighting model

UNLIT : Normals will be ignored (useful for point clouds)

NORMALS : Pixel colors correspond to surface normal

DEPTH : Pixel colors correspond to depth buffer value

DEPTH = <Shader.DEPTH: 3>#
NORMALS = <Shader.NORMALS: 2>#
STANDARD = <Shader.STANDARD: 0>#
UNLIT = <Shader.UNLIT: 1>#
property value#
class TickResult#

Return value from animation tick callback

Members:

NO_CHANGE : Signals that no change happened and no redraw is required

REDRAW : Signals that a redraw is required

NO_CHANGE = <TickResult.NO_CHANGE: 0>#
REDRAW = <TickResult.REDRAW: 1>#
property value#
__init__(self: open3d.cpu.pybind.visualization.O3DVisualizer, title: str = 'Open3D', width: int = 1024, height: int = 768) None#

Creates a O3DVisualizer object

add_3d_label(self: open3d.cpu.pybind.visualization.O3DVisualizer, pos: numpy.ndarray[numpy.float32[3, 1]], text: str) None#

Displays text anchored at the 3D coordinate specified

add_action(self: open3d.cpu.pybind.visualization.O3DVisualizer, name: str, callback: Callable[[open3d.cpu.pybind.visualization.O3DVisualizer], None]) None#

Adds a button to the custom actions section of the UI and a corresponding menu item in the “Actions” menu. The callback will be given one parameter, the O3DVisualizer instance, and does not return any value.

add_geometry(*args, **kwargs)#

Overloaded function.

  1. add_geometry(self: open3d.cpu.pybind.visualization.O3DVisualizer, name: str, geometry: open3d.cpu.pybind.geometry.Geometry3D, material: open3d.cpu.pybind.visualization.rendering.MaterialRecord = None, group: str = ‘’, time: float = 0.0, is_visible: bool = True) -> None

Adds a geometry. ‘name’ must be unique.

  1. add_geometry(self: open3d.cpu.pybind.visualization.O3DVisualizer, name: str, geometry: open3d.cpu.pybind.t.geometry.Geometry, material: open3d.cpu.pybind.visualization.rendering.MaterialRecord = None, group: str = ‘’, time: float = 0.0, is_visible: bool = True) -> None

Adds a Tensor-based geometry. ‘name’ must be unique.

  1. add_geometry(self: open3d.cpu.pybind.visualization.O3DVisualizer, name: str, model: open3d.cpu.pybind.visualization.rendering.TriangleMeshModel, material: open3d.cpu.pybind.visualization.rendering.MaterialRecord = None, group: str = ‘’, time: float = 0.0, is_visible: bool = True) -> None

Adds a TriangleMeshModel. ‘name’ must be unique. ‘material’ is ignored.

  1. add_geometry(self: object, d: dict) -> None

Adds a geometry from a dictionary. The dictionary has the following elements: name: unique name of the object (required) geometry: the geometry or t.geometry object (required) material: a visualization.rendering.Material object (optional) group: a string declaring the group it is a member of (optional) time: a time value

clear_3d_labels(self: open3d.cpu.pybind.visualization.O3DVisualizer) None#

Clears all 3D text

close(self: open3d.cpu.pybind.visualization.O3DVisualizer) None#

Closes the window and destroys it, unless an on_close callback cancels the close.

close_dialog(self: open3d.cpu.pybind.visualization.O3DVisualizer) None#

Closes the current dialog

enable_raw_mode(self: open3d.cpu.pybind.visualization.O3DVisualizer, enable: bool) None#

Enables/disables raw mode for simplified lighting environment.

export_current_image(self: open3d.cpu.pybind.visualization.O3DVisualizer, path: str) None#

Exports a PNG image of what is currently displayed to the given path.

get_geometry(self: open3d.cpu.pybind.visualization.O3DVisualizer, name: str) open3d.cpu.pybind.visualization.O3DVisualizer.DrawObject#

Returns the DrawObject corresponding to the name. This should be treated as read-only. Modify visibility with show_geometry(), and other values by removing the object and re-adding it with the new values

get_geometry_material(self: open3d.cpu.pybind.visualization.O3DVisualizer, name: str) open3d.cpu.pybind.visualization.rendering.MaterialRecord#

Returns the MaterialRecord corresponding to the name. The returned material is a copy, therefore modifying it directly will not change the visualization.

get_selection_sets(self: open3d.cpu.pybind.visualization.O3DVisualizer) List[Dict[str, Set[open3d.cpu.pybind.visualization.SelectedIndex]]]#

Returns the selection sets, as [{‘obj_name’, [SelectedIndex]}]

modify_geometry_material(self: open3d.cpu.pybind.visualization.O3DVisualizer, name: str, material: open3d.cpu.pybind.visualization.rendering.MaterialRecord) None#

Updates the named geometry to use the new provided material.

post_redraw(self: open3d.cpu.pybind.visualization.O3DVisualizer) None#

Tells the window to redraw

remove_geometry(self: open3d.cpu.pybind.visualization.O3DVisualizer, name: str) None#

Removes the geometry with the name.

reset_camera_to_default(self: open3d.cpu.pybind.visualization.O3DVisualizer) None#

Sets camera to default position

set_background(self: open3d.cpu.pybind.visualization.O3DVisualizer, bg_color: numpy.ndarray[numpy.float32[4, 1]], bg_image: open3d.cpu.pybind.geometry.Image) None#

Sets the background color and, optionally, the background image. Passing None for the background image will clear any image already there.

set_ibl(self: open3d.cpu.pybind.visualization.O3DVisualizer, ibl_name: str) None#

Sets the IBL and its matching skybox. If ibl_name_ibl.ktx is found in the default resource directory then it is used. Otherwise, ibl_name is assumed to be a path to the ibl KTX file.

set_ibl_intensity(self: open3d.cpu.pybind.visualization.O3DVisualizer, intensity: float) None#

Sets the intensity of the current IBL

set_on_animation_frame(self: open3d.cpu.pybind.visualization.O3DVisualizer, callback: Callable[[open3d.cpu.pybind.visualization.O3DVisualizer, float], None]) None#

Sets a callback that will be called every frame of the animation. The callback will be called as callback(o3dvis, current_time).

set_on_animation_tick(self: open3d.cpu.pybind.visualization.O3DVisualizer, callback: Callable[[open3d.cpu.pybind.visualization.O3DVisualizer, float, float], open3d.cpu.pybind.visualization.O3DVisualizer.TickResult]) None#

Sets a callback that will be called every frame of the animation. The callback will be called as callback(o3dvis, time_since_last_tick, total_elapsed_since_animation_started). Note that this is a low-level callback. If you need to change the current timestamp being shown you will need to update the o3dvis.current_time property in the callback. The callback must return either O3DVisualizer.TickResult.IGNORE if no redraw is required or O3DVisualizer.TickResult.REDRAW if a redraw is required.

set_on_close(self: open3d.cpu.pybind.visualization.O3DVisualizer, callback: Callable[[], bool]) None#

Sets a callback that will be called when the window is closed. The callback is given no arguments and should return True to continue closing the window or False to cancel the close

setup_camera(*args, **kwargs)#

Overloaded function.

  1. setup_camera(self: open3d.cpu.pybind.visualization.O3DVisualizer, field_of_view: float, center: numpy.ndarray[numpy.float32[3, 1]], eye: numpy.ndarray[numpy.float32[3, 1]], up: numpy.ndarray[numpy.float32[3, 1]]) -> None

Sets the camera view so that the camera is located at ‘eye’, pointing towards ‘center’, and oriented so that the up vector is ‘up’

  1. setup_camera(self: open3d.cpu.pybind.visualization.O3DVisualizer, intrinsic: open3d.cpu.pybind.camera.PinholeCameraIntrinsic, extrinsic_matrix: numpy.ndarray[numpy.float64[4, 4]]) -> None

Sets the camera view

  1. setup_camera(self: open3d.cpu.pybind.visualization.O3DVisualizer, intrinsic_matrix: numpy.ndarray[numpy.float64[3, 3]], extrinsic_matrix: numpy.ndarray[numpy.float64[4, 4]], intrinsic_width_px: int, intrinsic_height_px: int) -> None

Sets the camera view

show(self: open3d.cpu.pybind.visualization.O3DVisualizer, vis: bool) None#

Shows or hides the window

show_dialog(self: open3d.cpu.pybind.visualization.O3DVisualizer, dlg: open3d.cpu.pybind.visualization.gui.Dialog) None#

Displays the dialog

show_geometry(self: open3d.cpu.pybind.visualization.O3DVisualizer, name: str, show: bool) None#

Checks or unchecks the named geometry in the list. Note that even if show_geometry(name, True) is called, the object may not actually be visible if its group is unchecked, or if an animation is in progress.

show_menu(self: open3d.cpu.pybind.visualization.O3DVisualizer, show: bool) None#

Shows or hides the menu in the window, except on macOS since the menubar is not in the window and all applications must have a menubar.

show_message_box(self: open3d.cpu.pybind.visualization.O3DVisualizer, title: str, message: str) None#

Displays a simple dialog with a title and message and okay button

show_skybox(self: open3d.cpu.pybind.visualization.O3DVisualizer, show: bool) None#

Show/Hide the skybox

size_to_fit(self: open3d.cpu.pybind.visualization.O3DVisualizer) None#

Sets the width and height of window to its preferred size

start_rpc_interface(self: open3d.cpu.pybind.visualization.O3DVisualizer, address: str, timeout: int) None#

Starts the RPC interface. address: str with the address to listen on. timeout: int timeout in milliseconds for sending the reply.

stop_rpc_interface(self: open3d.cpu.pybind.visualization.O3DVisualizer) None#

Stops the RPC interface.

update_geometry(self: open3d.cpu.pybind.visualization.O3DVisualizer, name: str, tpoint_cloud: open3d.cpu.pybind.t.geometry.Geometry, update_flags: int) None#

Updates the attributes of the named geometry specified by update_flags with tpoint_cloud. Note: Currently this function only works with T Geometry Point Clouds.

DEPTH = <Shader.DEPTH: 3>#
NORMALS = <Shader.NORMALS: 2>#
STANDARD = <Shader.STANDARD: 0>#
UNLIT = <Shader.UNLIT: 1>#
property animation_duration#

Gets/sets the duration (in seconds) of the animation. This is automatically computed to be the difference between the minimum and maximum time values, but this is useful if no time values have been specified (that is, all objects are at the default t=0)

property animation_frame_delay#

Gets/sets the length of time a frame is visible.

property animation_time_step#

Gets/sets the time step for animations. Default is 1.0 sec

property content_rect#

Returns the frame in device pixels, relative to the window, which is available for widgets (read-only)

property current_time#

Gets/sets the current time. If setting, only the objects belonging to the current time-step will be displayed

property ground_plane#

Sets the plane for ground plane, XZ, XY, or YZ

property is_animating#

Gets/sets the status of the animation. Changing value will start or stop the animating.

property is_visible#

True if window is visible (read-only)

property line_width#

Gets/sets width of lines (in units of pixels)

property mouse_mode#

Gets/sets the control mode being used for the mouse

property os_frame#

Window rect in OS coords, not device pixels

property point_size#

Gets/sets size of points (in units of pixels)

property scaling#

Returns the scaling factor between OS pixels and device pixels (read-only)

property scene#

Returns the rendering.Open3DScene object for low-level manipulation

property scene_shader#

Gets/sets the shading model for the scene

property show_axes#

Gets/sets if axes are visible

property show_ground#

Gets/sets if ground plane is visible

property show_settings#

Gets/sets if settings panel is visible

property size#

The size of the window in device pixels, including menubar (except on macOS)

property title#

Returns the title of the window

property uid#

Window’s unique ID when WebRTCWindowSystem is use.Returns ‘window_undefined’ otherwise.