MCPcopy Index your code
hub / github.com/apple/ml-pointersect / draw_geometries

Function draw_geometries

plib/utils.py:2565–2609  ·  view source on GitHub ↗

Mimic the behavior of :py:`o3d.visualization.draw_geometries` but free objects properly. Args: geometry_list: List of geometries to be visualized. window_name: The displayed title of the visualization window width: The width of th

(
        geometry_list: T.List[o3d.geometry.Geometry],
        window_name: str = '',
        width: int = 1920,
        height: int = 1080,
        left: int = 50,
        top: int = 50,
)

Source from the content-addressed store, hash-verified

2563
2564
2565def draw_geometries(
2566 geometry_list: T.List[o3d.geometry.Geometry],
2567 window_name: str = '',
2568 width: int = 1920,
2569 height: int = 1080,
2570 left: int = 50,
2571 top: int = 50,
2572) -> T.Union[o3d.visualization.Visualizer, None]:
2573 """
2574 Mimic the behavior of :py:`o3d.visualization.draw_geometries` but free objects properly.
2575
2576 Args:
2577 geometry_list:
2578 List of geometries to be visualized.
2579 window_name:
2580 The displayed title of the visualization window
2581 width:
2582 The width of the visualization window.
2583 height:
2584 The height of the visualization window.
2585 left:
2586 The left margin of the visualization window.
2587 top:
2588 The top margin of the visualization window.
2589
2590 Returns:
2591 vis or None
2592 """
2593
2594 vis = o3d.visualization.Visualizer()
2595 vis.create_window(
2596 width=width,
2597 height=height,
2598 left=left,
2599 top=top,
2600 window_name=window_name,
2601 visible=True,
2602 )
2603 # show back face to make sure ray-casting and rendering results are the same
2604 vis.get_render_option().mesh_show_back_face = True
2605
2606 for mesh in geometry_list:
2607 vis.add_geometry(mesh)
2608 vis.run()
2609 vis = destroy_vis(vis)
2610
2611
2612def destroy_vis(vis: T.Union[o3d.visualization.Visualizer, None]):

Callers

nothing calls this directly

Calls 2

destroy_visFunction · 0.85
runMethod · 0.80

Tested by

no test coverage detected