pub struct Viz3d { /* private fields */ }
Expand description
The Viz3d class represents a 3D visualizer window. This class is implicitly shared.
Implementations
Trait Implementations
sourceimpl Boxed for Viz3d
impl Boxed for Viz3d
sourceimpl Viz3dTrait for Viz3d
impl Viz3dTrait for Viz3d
fn as_raw_mut_Viz3d(&mut self) -> *mut c_void
sourcefn show_widget(&mut self, id: &str, widget: &Widget, pose: Affine3d) -> Result<()>
fn show_widget(&mut self, id: &str, widget: &Widget, pose: Affine3d) -> Result<()>
Shows a widget in the window. Read more
sourcefn remove_widget(&mut self, id: &str) -> Result<()>
fn remove_widget(&mut self, id: &str) -> Result<()>
Removes a widget from the window. Read more
sourcefn remove_all_widgets(&mut self) -> Result<()>
fn remove_all_widgets(&mut self) -> Result<()>
Removes all widgets from the window.
sourcefn show_image(
&mut self,
image: &dyn ToInputArray,
window_size: Size
) -> Result<()>
fn show_image(
&mut self,
image: &dyn ToInputArray,
window_size: Size
) -> Result<()>
Removed all widgets and displays image scaled to whole window area. Read more
sourcefn set_widget_pose(&mut self, id: &str, pose: Affine3d) -> Result<()>
fn set_widget_pose(&mut self, id: &str, pose: Affine3d) -> Result<()>
Sets pose of a widget in the window. Read more
sourcefn update_widget_pose(&mut self, id: &str, pose: Affine3d) -> Result<()>
fn update_widget_pose(&mut self, id: &str, pose: Affine3d) -> Result<()>
Updates pose of a widget in the window by pre-multiplying its current pose. Read more
sourcefn set_camera(&mut self, camera: &Camera) -> Result<()>
fn set_camera(&mut self, camera: &Camera) -> Result<()>
Sets the intrinsic parameters of the viewer using Camera. Read more
sourcefn reset_camera_viewpoint(&mut self, id: &str) -> Result<()>
fn reset_camera_viewpoint(&mut self, id: &str) -> Result<()>
Resets camera viewpoint to a 3D widget in the scene. Read more
sourcefn reset_camera(&mut self) -> Result<()>
fn reset_camera(&mut self) -> Result<()>
Resets camera.
sourcefn convert_to_window_coordinates(
&mut self,
pt: Point3d,
window_coord: &mut Point3d
) -> Result<()>
fn convert_to_window_coordinates(
&mut self,
pt: Point3d,
window_coord: &mut Point3d
) -> Result<()>
Transforms a point in world coordinate system to window coordinate system. Read more
sourcefn conver_to3_d_ray(
&mut self,
window_coord: Point3d,
origin: &mut Point3d,
direction: &mut Vec3d
) -> Result<()>
fn conver_to3_d_ray(
&mut self,
window_coord: Point3d,
origin: &mut Point3d,
direction: &mut Vec3d
) -> Result<()>
Transforms a point in window coordinate system to a 3D ray in world coordinate system. Read more
sourcefn set_window_size(&mut self, window_size: Size) -> Result<()>
fn set_window_size(&mut self, window_size: Size) -> Result<()>
Sets the size of the window. Read more
sourcefn save_screenshot(&mut self, file: &str) -> Result<()>
fn save_screenshot(&mut self, file: &str) -> Result<()>
Saves screenshot of the current scene. Read more
sourcefn set_window_position(&mut self, window_position: Point) -> Result<()>
fn set_window_position(&mut self, window_position: Point) -> Result<()>
Sets the position of the window in the screen. Read more
sourcefn set_full_screen(&mut self, mode: bool) -> Result<()>
fn set_full_screen(&mut self, mode: bool) -> Result<()>
Sets or unsets full-screen rendering mode. Read more
sourcefn set_background_color(
&mut self,
color: &Viz3d_Color,
color2: &Viz3d_Color
) -> Result<()>
fn set_background_color(
&mut self,
color: &Viz3d_Color,
color2: &Viz3d_Color
) -> Result<()>
Sets background color. Read more
sourcefn set_background_texture(&mut self, image: &dyn ToInputArray) -> Result<()>
fn set_background_texture(&mut self, image: &dyn ToInputArray) -> Result<()>
C++ default parameters Read more
fn set_background_mesh_lab(&mut self) -> Result<()>
sourcefn spin_once(&mut self, time: i32, force_redraw: bool) -> Result<()>
fn spin_once(&mut self, time: i32, force_redraw: bool) -> Result<()>
Starts the event loop for a given time. Read more
sourcefn set_off_screen_rendering(&mut self) -> Result<()>
fn set_off_screen_rendering(&mut self) -> Result<()>
Create a window in memory instead of on the screen.
sourcefn remove_all_lights(&mut self) -> Result<()>
fn remove_all_lights(&mut self) -> Result<()>
Remove all lights from the current scene.
sourcefn add_light(
&mut self,
position: Vec3d,
focal_point: Vec3d,
color: &Viz3d_Color,
diffuse_color: &Viz3d_Color,
ambient_color: &Viz3d_Color,
specular_color: &Viz3d_Color
) -> Result<()>
fn add_light(
&mut self,
position: Vec3d,
focal_point: Vec3d,
color: &Viz3d_Color,
diffuse_color: &Viz3d_Color,
ambient_color: &Viz3d_Color,
specular_color: &Viz3d_Color
) -> Result<()>
Add a light in the scene. Read more
fn close(&mut self) -> Result<()>
sourcefn register_keyboard_callback(
&mut self,
callback: Viz3d_KeyboardCallback
) -> Result<()>
fn register_keyboard_callback(
&mut self,
callback: Viz3d_KeyboardCallback
) -> Result<()>
Sets keyboard handler. Read more
sourcefn register_mouse_callback(
&mut self,
callback: Viz3d_MouseCallback
) -> Result<()>
fn register_mouse_callback(
&mut self,
callback: Viz3d_MouseCallback
) -> Result<()>
Sets mouse handler. Read more
sourcefn set_rendering_property(
&mut self,
id: &str,
property: i32,
value: f64
) -> Result<()>
fn set_rendering_property(
&mut self,
id: &str,
property: i32,
value: f64
) -> Result<()>
Sets rendering property of a widget. Read more
sourcefn get_rendering_property(&mut self, id: &str, property: i32) -> Result<f64>
fn get_rendering_property(&mut self, id: &str, property: i32) -> Result<f64>
Returns rendering property of a widget. Read more
sourceimpl Viz3dTraitConst for Viz3d
impl Viz3dTraitConst for Viz3d
fn as_raw_Viz3d(&self) -> *const c_void
sourcefn get_widget_pose(&self, id: &str) -> Result<Affine3d>
fn get_widget_pose(&self, id: &str) -> Result<Affine3d>
Returns the current pose of a widget in the window. Read more
sourcefn get_camera(&self) -> Result<Camera>
fn get_camera(&self) -> Result<Camera>
Returns a camera object that contains intrinsic parameters of the current viewer.
sourcefn get_viewer_pose(&self) -> Result<Affine3d>
fn get_viewer_pose(&self) -> Result<Affine3d>
Returns the current pose of the viewer.
sourcefn get_window_size(&self) -> Result<Size>
fn get_window_size(&self) -> Result<Size>
Returns the current size of the window.
sourcefn get_window_name(&self) -> Result<String>
fn get_window_name(&self) -> Result<String>
Returns the name of the window which has been set in the constructor.
Viz -
is prepended to the name if necessary. Read moresourcefn get_screenshot(&self) -> Result<Mat>
fn get_screenshot(&self) -> Result<Mat>
Returns the Mat screenshot of the current scene.
sourcefn was_stopped(&self) -> Result<bool>
fn was_stopped(&self) -> Result<bool>
Returns whether the event loop has been stopped.
impl Send for Viz3d
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more