cloudViewer.visualization.VisualizerWithVertexSelection#
- class cloudViewer.visualization.VisualizerWithVertexSelection#
Visualizer with vertex selection capabilities.
- __init__(*args, **kwargs)#
Overloaded function.
__init__(self: cloudViewer.visualization.VisualizerWithVertexSelection) -> None
Default constructor
__init__(self: cloudViewer.visualization.VisualizerWithVertexSelection) -> None
- add_geometry(self, geometry, reset_bounding_box=True)#
Function to add geometry to the scene and create corresponding shaders
- Parameters:
geometry (cloudViewer.geometry.ccHObject) – The
Geometryobject.reset_bounding_box (bool, optional, default=True) – Set to
Falseto keep current viewpoint
- Returns:
bool
- add_picked_points(self: cloudViewer.visualization.VisualizerWithVertexSelection, indices: cloudViewer.utility.IntVector) None#
Function to add picked points
- capture_depth_float_buffer(self, do_render=False)#
Function to capture depth in a float buffer
- Parameters:
do_render (bool, optional, default=False) – Set to
Trueto do render.- Returns:
cloudViewer.geometry.Image
- capture_depth_image(self, filename, do_render=False, depth_scale=1000.0)#
Function to capture and save a depth image
- Parameters:
filename (Union[os.PathLike, str, bytes]) – Path to file.
do_render (bool, optional, default=False) – Set to
Trueto do render.depth_scale (SupportsFloat, optional, default=1000.0) – Scale depth value when capturing the depth image.
- Returns:
None
- capture_depth_point_cloud(self, filename, do_render=False, convert_to_world_coordinate=False)#
Function to capture and save local point cloud
- Parameters:
filename (Union[os.PathLike, str, bytes]) – Path to file.
do_render (bool, optional, default=False) – Set to
Trueto do render.convert_to_world_coordinate (bool, optional, default=False) – Set to
Trueto convert to world coordinates
- Returns:
None
- capture_screen_float_buffer(self, do_render=False)#
Function to capture screen and store RGB in a float buffer
- Parameters:
do_render (bool, optional, default=False) – Set to
Trueto do render.- Returns:
cloudViewer.geometry.Image
- capture_screen_image(self, filename, do_render=False)#
Function to capture and save a screen image
- Parameters:
filename (Union[os.PathLike, str, bytes]) – Path to file.
do_render (bool, optional, default=False) – Set to
Trueto do render.
- Returns:
None
- clear_geometries(self: cloudViewer.visualization.Visualizer) bool#
Function to clear geometries from the visualizer
- clear_picked_points(self: cloudViewer.visualization.VisualizerWithVertexSelection) None#
Function to clear picked points
- close(self)#
Function to notify the window to be closed
- Returns:
None
- create_window(self, window_name='CloudViewer', width=1920, height=1080, left=50, top=50, visible=True)#
Function to create a window and initialize GLFW
- Parameters:
window_name (str, optional, default='CloudViewer') – Window title name.
width (SupportsInt, optional, default=1920) – Width of the window.
height (SupportsInt, optional, default=1080) – Height of window.
left (SupportsInt, optional, default=50) – Left margin of the window to the screen.
top (SupportsInt, optional, default=50) – Top margin of the window to the screen.
visible (bool, optional, default=True) – Whether the window is visible.
- Returns:
bool
- destroy_window(self)#
Function to destroy a window. This function MUST be called from the main thread.
- Returns:
None
- get_picked_points(self: cloudViewer.visualization.VisualizerWithVertexSelection) list[cloudViewer::visualization::VisualizerWithVertexSelection::PickedPoint]#
Function to get picked points
- get_render_option(self)#
Function to retrieve the associated
RenderOption- Returns:
cloudViewer.visualization.RenderOption
- get_view_control(self)#
Function to retrieve the associated
ViewControl- Returns:
cloudViewer.visualization.ViewControl
- get_window_name(self)#
- Returns:
str
- is_full_screen(self)#
Function to query whether in fullscreen mode
- Returns:
bool
- pick_points(self: cloudViewer.visualization.VisualizerWithVertexSelection, x: SupportsFloat, y: SupportsFloat, w: SupportsFloat, h: SupportsFloat) cloudViewer.utility.IntVector#
Function to pick points
- poll_events(self)#
Function to poll events
- Returns:
bool
- register_animation_callback(self, callback_func)#
Function to register a callback function for animation. The callback function returns if UpdateGeometry() needs to be run.
- Parameters:
callback_func (collections.abc.Callable[[cloudViewer.visualization.Visualizer], bool]) – The call back function.
- Returns:
None
- register_selection_changed_callback(self: cloudViewer.visualization.VisualizerWithVertexSelection, f: collections.abc.Callable[[], None]) None#
Registers a function to be called when selection changes
- register_selection_moved_callback(self: cloudViewer.visualization.VisualizerWithVertexSelection, f: collections.abc.Callable[[], None]) None#
Registers a function to be called after selection moves
- register_selection_moving_callback(self: cloudViewer.visualization.VisualizerWithVertexSelection, f: collections.abc.Callable[[], None]) None#
Registers a function to be called while selection moves. Geometry’s vertex values can be changed, but do not changethe number of vertices.
- remove_geometry(self, geometry, reset_bounding_box=True)#
Function to remove geometry
- Parameters:
geometry (cloudViewer.geometry.ccHObject) – The
Geometryobject.reset_bounding_box (bool, optional, default=True) – Set to
Falseto keep current viewpoint
- Returns:
bool
- remove_picked_points(self: cloudViewer.visualization.VisualizerWithVertexSelection, indices: cloudViewer.utility.IntVector) None#
Function to remove picked points
- reset_view_point(self, reset_bounding_box=False)#
Function to reset view point
- Parameters:
reset_bounding_box (bool, optional, default=False) – Set to
Falseto keep current viewpoint- Returns:
None
- run(self)#
Function to activate the window. This function will block the current thread until the window is closed.
- Returns:
None
- set_full_screen(self, fullscreen)#
Function to change between fullscreen and windowed
- Parameters:
fullscreen (bool) –
- Returns:
None
- toggle_full_screen(self)#
Function to toggle between fullscreen and windowed
- Returns:
None
- update_geometry(self, geometry)#
Function to update geometry. This function must be called when geometry has been changed. Otherwise the behavior of Visualizer is undefined.
- Parameters:
geometry (cloudViewer.geometry.ccHObject) – The
Geometryobject.- Returns:
bool
- update_renderer(self)#
Function to inform render needed to be updated
- Returns:
None