[−][src]Struct opencv::viz::Viz3d
The Viz3d class represents a 3D visualizer window. This class is implicitly shared.
Methods
impl Viz3d
[src]
pub fn as_raw_Viz3d(&self) -> *mut c_void
[src]
pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self
[src]
impl Viz3d
[src]
pub fn new(window_name: &str) -> Result<Viz3d>
[src]
The constructors.
Parameters
- window_name: Name of the window.
C++ default parameters
- window_name: String()
pub fn copy(unnamed_arg: &Viz3d) -> Result<Viz3d>
[src]
pub fn remove_widget(&mut self, id: &str) -> Result<()>
[src]
pub fn get_widget(&self, id: &str) -> Result<Widget>
[src]
Retrieves a widget from the window.
A widget is implicitly shared; that is, if the returned widget is modified, the changes will be immediately visible in the window.
Parameters
- id: The id of the widget that will be returned.
pub fn remove_all_widgets(&mut self) -> Result<()>
[src]
Removes all widgets from the window.
pub fn show_image(
&mut self,
image: &dyn ToInputArray,
window_size: Size
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
window_size: Size
) -> Result<()>
Removed all widgets and displays image scaled to whole window area.
Parameters
- image: Image to be displayed.
- window_size: Size of Viz3d window. Default value means no change.
C++ default parameters
- window_size: Size(-1, -1)
pub fn set_camera(&mut self, camera: &Camera) -> Result<()>
[src]
Sets the intrinsic parameters of the viewer using Camera.
Parameters
- camera: Camera object wrapping intrinsic parameters.
pub fn get_camera(&self) -> Result<Camera>
[src]
Returns a camera object that contains intrinsic parameters of the current viewer.
pub fn reset_camera_viewpoint(&mut self, id: &str) -> Result<()>
[src]
pub fn reset_camera(&mut self) -> Result<()>
[src]
Resets camera.
pub fn convert_to_window_coordinates(
&mut self,
pt: Point3d,
window_coord: &mut Point3d
) -> Result<()>
[src]
&mut self,
pt: Point3d,
window_coord: &mut Point3d
) -> Result<()>
Transforms a point in world coordinate system to window coordinate system.
Parameters
- pt: Point in world coordinate system.
- window_coord: Output point in window coordinate system.
pub fn conver_to3_d_ray(
&mut self,
window_coord: Point3d,
origin: &mut Point3d,
direction: &mut Vec3d
) -> Result<()>
[src]
&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.
Parameters
- window_coord: Point in window coordinate system. @param origin Output origin of the ray.
- direction: Output direction of the ray.
pub fn get_window_size(&self) -> Result<Size>
[src]
Returns the current size of the window.
pub fn set_window_size(&mut self, window_size: Size) -> Result<()>
[src]
pub fn get_window_name(&self) -> Result<String>
[src]
Returns the name of the window which has been set in the constructor.
Viz -
is prepended to the name if necessary.
pub fn get_screenshot(&self) -> Result<Mat>
[src]
Returns the Mat screenshot of the current scene.
pub fn save_screenshot(&mut self, file: &str) -> Result<()>
[src]
pub fn set_window_position(&mut self, window_position: Point) -> Result<()>
[src]
Sets the position of the window in the screen.
Parameters
- window_position: coordinates of the window
pub fn set_full_screen(&mut self, mode: bool) -> Result<()>
[src]
Sets or unsets full-screen rendering mode.
Parameters
- mode: If true, window will use full-screen mode.
C++ default parameters
- mode: true
pub fn set_background_color(
&mut self,
color: &Color,
color2: &Color
) -> Result<()>
[src]
&mut self,
color: &Color,
color2: &Color
) -> Result<()>
pub fn set_background_texture(&mut self, image: &dyn ToInputArray) -> Result<()>
[src]
C++ default parameters
- image: noArray()
pub fn set_background_mesh_lab(&mut self) -> Result<()>
[src]
pub fn spin(&mut self) -> Result<()>
[src]
The window renders and starts the event loop.
pub fn spin_once(&mut self, time: i32, force_redraw: bool) -> Result<()>
[src]
Starts the event loop for a given time.
Parameters
- time: Amount of time in milliseconds for the event loop to keep running.
- force_redraw: If true, window renders.
C++ default parameters
- time: 1
- force_redraw: false
pub fn set_off_screen_rendering(&mut self) -> Result<()>
[src]
Create a window in memory instead of on the screen.
pub fn remove_all_lights(&mut self) -> Result<()>
[src]
Remove all lights from the current scene.
pub fn add_light(
&mut self,
position: Vec3d,
focal_point: Vec3d,
color: &Color,
diffuse_color: &Color,
ambient_color: &Color,
specular_color: &Color
) -> Result<()>
[src]
&mut self,
position: Vec3d,
focal_point: Vec3d,
color: &Color,
diffuse_color: &Color,
ambient_color: &Color,
specular_color: &Color
) -> Result<()>
Add a light in the scene.
Parameters
- position: The position of the light.
- focalPoint: The point at which the light is shining
- color: The color of the light
- diffuseColor: The diffuse color of the light
- ambientColor: The ambient color of the light
- specularColor: The specular color of the light
C++ default parameters
- focal_point: Vec3d(0, 0, 0)
- color: Color::white()
- diffuse_color: Color::white()
- ambient_color: Color::black()
- specular_color: Color::white()
pub fn was_stopped(&self) -> Result<bool>
[src]
Returns whether the event loop has been stopped.
pub fn close(&mut self) -> Result<()>
[src]
pub fn set_rendering_property(
&mut self,
id: &str,
property: i32,
value: f64
) -> Result<()>
[src]
&mut self,
id: &str,
property: i32,
value: f64
) -> Result<()>
Sets rendering property of a widget.
Parameters
- id: Id of the widget.
- property: Property that will be modified.
- value: The new value of the property.
Rendering property can be one of the following:
- POINT_SIZE
- OPACITY
- LINE_WIDTH
- FONT_SIZE
REPRESENTATION: Expected values are
- REPRESENTATION_POINTS
- REPRESENTATION_WIREFRAME
- REPRESENTATION_SURFACE
IMMEDIATE_RENDERING:
- Turn on immediate rendering by setting the value to 1.
- Turn off immediate rendering by setting the value to 0.
SHADING: Expected values are
- SHADING_FLAT
- SHADING_GOURAUD
- SHADING_PHONG
pub fn get_rendering_property(&mut self, id: &str, property: i32) -> Result<f64>
[src]
Returns rendering property of a widget.
Parameters
- id: Id of the widget.
- property: Property.
Rendering property can be one of the following:
- POINT_SIZE
- OPACITY
- LINE_WIDTH
- FONT_SIZE
REPRESENTATION: Expected values are
- REPRESENTATION_POINTS
- REPRESENTATION_WIREFRAME
- REPRESENTATION_SURFACE
IMMEDIATE_RENDERING:
- Turn on immediate rendering by setting the value to 1.
- Turn off immediate rendering by setting the value to 0.
SHADING: Expected values are
- SHADING_FLAT
- SHADING_GOURAUD
- SHADING_PHONG
pub fn set_representation(&mut self, representation: i32) -> Result<()>
[src]
Sets geometry representation of the widgets to surface, wireframe or points.
Parameters
- representation: Geometry representation which can be one of the following:
- REPRESENTATION_POINTS
- REPRESENTATION_WIREFRAME
- REPRESENTATION_SURFACE
pub fn set_global_warnings(&mut self, enabled: bool) -> Result<()>
[src]
C++ default parameters
- enabled: false
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,