pub struct Viz3d { /* private fields */ }
Expand description
The Viz3d class represents a 3D visualizer window. This class is implicitly shared.
Implementations§
Trait Implementations§
Source§impl Boxed for Viz3d
impl Boxed for Viz3d
Source§unsafe fn from_raw(ptr: <Viz3d as OpenCVFromExtern>::ExternReceive) -> Self
unsafe fn from_raw(ptr: <Viz3d as OpenCVFromExtern>::ExternReceive) -> Self
Wrap the specified raw pointer Read more
Source§fn into_raw(self) -> <Viz3d as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw(self) -> <Viz3d as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying raw pointer while consuming this wrapper. Read more
Source§fn as_raw(&self) -> <Viz3d as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <Viz3d as OpenCVTypeExternContainer>::ExternSend
Return the underlying raw pointer. Read more
Source§fn as_raw_mut(&mut self) -> <Viz3d as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut(&mut self) -> <Viz3d as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
Source§impl Viz3dTrait for Viz3d
impl Viz3dTrait for Viz3d
fn as_raw_mut_Viz3d(&mut self) -> *mut c_void
fn set(&mut self, unnamed: &impl Viz3dTraitConst) -> Result<()>
Source§fn show_widget(
&mut self,
id: &str,
widget: &impl WidgetTraitConst,
pose: Affine3d,
) -> Result<()>
fn show_widget( &mut self, id: &str, widget: &impl WidgetTraitConst, pose: Affine3d, ) -> Result<()>
Shows a widget in the window. Read more
Source§fn show_widget_def(
&mut self,
id: &str,
widget: &impl WidgetTraitConst,
) -> Result<()>
fn show_widget_def( &mut self, id: &str, widget: &impl WidgetTraitConst, ) -> 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: &impl CameraTraitConst) -> Result<()>
fn set_camera(&mut self, camera: &impl CameraTraitConst) -> 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: &impl ColorTraitConst,
color2: &impl ColorTraitConst,
) -> Result<()>
fn set_background_color( &mut self, color: &impl ColorTraitConst, color2: &impl ColorTraitConst, ) -> 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: &impl ColorTraitConst,
diffuse_color: &impl ColorTraitConst,
ambient_color: &impl ColorTraitConst,
specular_color: &impl ColorTraitConst,
) -> Result<()>
fn add_light( &mut self, position: Vec3d, focal_point: Vec3d, color: &impl ColorTraitConst, diffuse_color: &impl ColorTraitConst, ambient_color: &impl ColorTraitConst, specular_color: &impl ColorTraitConst, ) -> 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§
impl Freeze for Viz3d
impl RefUnwindSafe for Viz3d
impl !Sync for Viz3d
impl Unpin for Viz3d
impl UnwindSafe for Viz3d
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
Source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
Source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res,
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res
Helper function to call OpenCV functions that allow in-place modification of a
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data,
but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place
modification is imgproc::threshold
. Read more