pub struct Viz3d { /* private fields */ }
Expand description
The Viz3d class represents a 3D visualizer window. This class is implicitly shared.
Implementations§
source§impl Viz3d
impl Viz3d
sourcepub fn new(window_name: &str) -> Result<Viz3d>
pub fn new(window_name: &str) -> Result<Viz3d>
The constructors.
Parameters
- window_name: Name of the window.
C++ default parameters
- window_name: String()
sourcepub fn new_def() -> Result<Viz3d>
pub fn new_def() -> Result<Viz3d>
The constructors.
Parameters
- window_name: Name of the window.
Note
This alternative version of [new] function uses the following default values for its arguments:
- window_name: String()
pub fn copy(unnamed: &Viz3d) -> Result<Viz3d>
Trait Implementations§
source§impl Boxed for Viz3d
impl Boxed for Viz3d
source§impl Viz3dTrait for Viz3d
impl Viz3dTrait for Viz3d
fn as_raw_mut_Viz3d(&mut self) -> *mut c_void
fn set(&mut self, unnamed: &Viz3d) -> Result<()>
source§fn 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
source§fn show_widget_def(&mut self, id: &str, widget: &Widget) -> Result<()>
fn show_widget_def(&mut self, id: &str, widget: &Widget) -> Result<()>
Shows a widget in the window. Read more
source§fn remove_widget(&mut self, id: &str) -> Result<()>
fn remove_widget(&mut self, id: &str) -> Result<()>
Removes a widget from the window. Read more
source§fn remove_all_widgets(&mut self) -> Result<()>
fn remove_all_widgets(&mut self) -> Result<()>
Removes all widgets from the window.
source§fn show_image(
&mut self,
image: &impl ToInputArray,
window_size: Size
) -> Result<()>
fn show_image( &mut self, image: &impl ToInputArray, window_size: Size ) -> Result<()>
Removed all widgets and displays image scaled to whole window area. Read more
source§fn show_image_def(&mut self, image: &impl ToInputArray) -> Result<()>
fn show_image_def(&mut self, image: &impl ToInputArray) -> Result<()>
Removed all widgets and displays image scaled to whole window area. Read more
source§fn 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
source§fn 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
source§fn 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
source§fn set_viewer_pose(&mut self, pose: Affine3d) -> Result<()>
fn set_viewer_pose(&mut self, pose: Affine3d) -> Result<()>
Sets pose of the viewer. Read more
source§fn 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
source§fn reset_camera(&mut self) -> Result<()>
fn reset_camera(&mut self) -> Result<()>
Resets camera.
source§fn 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
source§fn conver_to_3d_ray(
&mut self,
window_coord: Point3d,
origin: &mut Point3d,
direction: &mut Vec3d
) -> Result<()>
fn conver_to_3d_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
source§fn 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
source§fn save_screenshot(&mut self, file: &str) -> Result<()>
fn save_screenshot(&mut self, file: &str) -> Result<()>
Saves screenshot of the current scene. Read more
source§fn 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
source§fn 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
source§fn set_full_screen_def(&mut self) -> Result<()>
fn set_full_screen_def(&mut self) -> Result<()>
Sets or unsets full-screen rendering mode. Read more
source§fn 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
source§fn set_background_texture(&mut self, image: &impl ToInputArray) -> Result<()>
fn set_background_texture(&mut self, image: &impl ToInputArray) -> Result<()>
C++ default parameters Read more
fn set_background_mesh_lab(&mut self) -> Result<()>
source§fn 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
source§fn 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.
source§fn remove_all_lights(&mut self) -> Result<()>
fn remove_all_lights(&mut self) -> Result<()>
Remove all lights from the current scene.
source§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<()>
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
source§fn add_light_def(&mut self, position: Vec3d) -> Result<()>
fn add_light_def(&mut self, position: Vec3d) -> Result<()>
Add a light in the scene. Read more
fn close(&mut self) -> Result<()>
source§fn register_keyboard_callback(
&mut self,
callback: Viz3d_KeyboardCallback
) -> Result<()>
fn register_keyboard_callback( &mut self, callback: Viz3d_KeyboardCallback ) -> Result<()>
Sets keyboard handler. Read more
source§fn register_mouse_callback(
&mut self,
callback: Viz3d_MouseCallback
) -> Result<()>
fn register_mouse_callback( &mut self, callback: Viz3d_MouseCallback ) -> Result<()>
Sets mouse handler. Read more
source§fn 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
source§fn 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
source§fn set_representation(&mut self, representation: i32) -> Result<()>
fn set_representation(&mut self, representation: i32) -> Result<()>
Sets geometry representation of the widgets to surface, wireframe or points. Read more
source§impl Viz3dTraitConst for Viz3d
impl Viz3dTraitConst for Viz3d
fn as_raw_Viz3d(&self) -> *const c_void
source§fn get_widget(&self, id: &str) -> Result<Widget>
fn get_widget(&self, id: &str) -> Result<Widget>
Retrieves a widget from the window. Read more
source§fn 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
source§fn get_camera(&self) -> Result<Camera>
fn get_camera(&self) -> Result<Camera>
Returns a camera object that contains intrinsic parameters of the current viewer.
source§fn get_viewer_pose(&self) -> Result<Affine3d>
fn get_viewer_pose(&self) -> Result<Affine3d>
Returns the current pose of the viewer.
source§fn get_window_size(&self) -> Result<Size>
fn get_window_size(&self) -> Result<Size>
Returns the current size of the window.
source§fn 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.source§fn get_screenshot(&self) -> Result<Mat>
fn get_screenshot(&self) -> Result<Mat>
Returns the Mat screenshot of the current scene.
source§fn 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more