Struct opencv::viz::Viz3d

source ·
pub struct Viz3d { /* private fields */ }
Expand description

The Viz3d class represents a 3D visualizer window. This class is implicitly shared.

Implementations§

source§

impl Viz3d

source

pub fn new(window_name: &str) -> Result<Viz3d>

The constructors.

Parameters
  • window_name: Name of the window.
C++ default parameters
  • window_name: String()
source

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()
source

pub fn copy(unnamed: &Viz3d) -> Result<Viz3d>

Trait Implementations§

source§

impl Boxed for Viz3d

source§

unsafe fn from_raw(ptr: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

Return an the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

fn as_raw_mut(&mut self) -> *mut c_void

Return the underlying mutable raw pointer Read more
source§

impl Debug for Viz3d

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for Viz3d

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Viz3dTrait for Viz3d

source§

fn as_raw_mut_Viz3d(&mut self) -> *mut c_void

source§

fn set(&mut self, unnamed: &Viz3d) -> Result<()>

source§

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<()>

Shows a widget in the window. Read more
source§

fn remove_widget(&mut self, id: &str) -> Result<()>

Removes a widget from the window. Read more
source§

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<()>

Removed all widgets and displays image scaled to whole window area. Read more
source§

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<()>

Sets pose of a widget in the window. Read more
source§

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<()>

Sets the intrinsic parameters of the viewer using Camera. Read more
source§

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<()>

Resets camera viewpoint to a 3D widget in the scene. Read more
source§

fn reset_camera(&mut self) -> Result<()>

Resets camera.
source§

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<()>

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<()>

Sets the size of the window. Read more
source§

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<()>

Sets the position of the window in the screen. Read more
source§

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<()>

Sets or unsets full-screen rendering mode. Read more
source§

fn set_background_color( &mut self, color: &Viz3d_Color, color2: &Viz3d_Color ) -> Result<()>

Sets background color. Read more
source§

fn set_background_color_def(&mut self) -> Result<()>

Sets background color. Read more
source§

fn set_background_texture(&mut self, image: &impl ToInputArray) -> Result<()>

C++ default parameters Read more
source§

fn set_background_texture_def(&mut self) -> Result<()>

source§

fn set_background_mesh_lab(&mut self) -> Result<()>

source§

fn spin(&mut self) -> Result<()>

The window renders and starts the event loop.
source§

fn spin_once(&mut self, time: i32, force_redraw: bool) -> Result<()>

Starts the event loop for a given time. Read more
source§

fn spin_once_def(&mut self) -> Result<()>

Starts the event loop for a given time. Read more
source§

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<()>

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<()>

Add a light in the scene. Read more
source§

fn add_light_def(&mut self, position: Vec3d) -> Result<()>

Add a light in the scene. Read more
source§

fn close(&mut self) -> Result<()>

source§

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<()>

Sets mouse handler. Read more
source§

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>

Returns rendering property of a widget. Read more
source§

fn set_representation(&mut self, representation: i32) -> Result<()>

Sets geometry representation of the widgets to surface, wireframe or points. Read more
source§

fn set_global_warnings(&mut self, enabled: bool) -> Result<()>

C++ default parameters Read more
source§

fn set_global_warnings_def(&mut self) -> Result<()>

source§

impl Viz3dTraitConst for Viz3d

source§

fn as_raw_Viz3d(&self) -> *const c_void

source§

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>

Returns the current pose of a widget in the window. Read more
source§

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>

Returns the current pose of the viewer.
source§

fn get_window_size(&self) -> Result<Size>

Returns the current size of the window.
source§

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>

Returns the Mat screenshot of the current scene.
source§

fn was_stopped(&self) -> Result<bool>

Returns whether the event loop has been stopped.
source§

impl Send for Viz3d

Auto Trait Implementations§

§

impl RefUnwindSafe for Viz3d

§

impl !Sync for Viz3d

§

impl Unpin for Viz3d

§

impl UnwindSafe for Viz3d

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.