Skip to main content

show

Function show 

Source
pub fn show()
Expand description

Shows the polyscope viewer window.

This function opens the interactive 3D viewer and blocks until the window is closed (by pressing ESC or clicking the close button).

Before calling show(), you should:

  1. Call init() to initialize polyscope
  2. Register structures using register_*() functions
  3. Optionally add quantities to structures

ยงExample

use polyscope_rs::*;

fn main() -> Result<()> {
    init()?;
     
    // Register some geometry
    let points = vec![Vec3::ZERO, Vec3::X, Vec3::Y];
    register_point_cloud("my points", points);
     
    // Open the viewer (blocks until closed)
    show();
     
    Ok(())
}