Subdiv2D

Struct Subdiv2D 

Source
pub struct Subdiv2D { /* private fields */ }

Implementations§

Source§

impl Subdiv2D

Source

pub fn default() -> Result<Subdiv2D>

creates an empty Subdiv2D object. To create a new empty Delaunay subdivision you need to use the [init_delaunay] function.

Source

pub fn new(rect: Rect) -> Result<Subdiv2D>

creates an empty Subdiv2D object. To create a new empty Delaunay subdivision you need to use the [init_delaunay] function.

§Overloaded parameters
§Parameters
  • rect: Rectangle that includes all of the 2D points that are to be added to the subdivision.

The function creates an empty Delaunay subdivision where 2D points can be added using the function insert() . All of the points to be added must be within the specified rectangle, otherwise a runtime error is raised.

Trait Implementations§

Source§

impl Boxed for Subdiv2D

Source§

unsafe fn from_raw(ptr: <Subdiv2D as OpenCVFromExtern>::ExternReceive) -> Self

Wrap the specified raw pointer Read more
Source§

fn into_raw(self) -> <Subdiv2D as OpenCVTypeExternContainer>::ExternSendMut

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

fn as_raw(&self) -> <Subdiv2D as OpenCVTypeExternContainer>::ExternSend

Return the underlying raw pointer. Read more
Source§

fn as_raw_mut( &mut self, ) -> <Subdiv2D as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying mutable raw pointer Read more
Source§

impl Debug for Subdiv2D

Source§

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

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

impl Drop for Subdiv2D

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Subdiv2DTrait for Subdiv2D

Source§

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

Source§

fn init_delaunay(&mut self, rect: Rect) -> Result<()>

Creates a new empty Delaunay subdivision Read more
Source§

fn insert(&mut self, pt: Point2f) -> Result<i32>

Insert a single point into a Delaunay triangulation. Read more
Source§

fn insert_multiple(&mut self, ptvec: &Vector<Point2f>) -> Result<()>

Insert multiple points into a Delaunay triangulation. Read more
Source§

fn locate( &mut self, pt: Point2f, edge: &mut i32, vertex: &mut i32, ) -> Result<i32>

Returns the location of a point within a Delaunay triangulation. Read more
Source§

fn find_nearest(&mut self, pt: Point2f, nearest_pt: &mut Point2f) -> Result<i32>

Finds the subdivision vertex closest to the given point. Read more
Source§

fn find_nearest_def(&mut self, pt: Point2f) -> Result<i32>

Finds the subdivision vertex closest to the given point. Read more
Source§

fn get_voronoi_facet_list( &mut self, idx: &Vector<i32>, facet_list: &mut Vector<Vector<Point2f>>, facet_centers: &mut Vector<Point2f>, ) -> Result<()>

Returns a list of all Voronoi facets. Read more
Source§

impl Subdiv2DTraitConst for Subdiv2D

Source§

fn as_raw_Subdiv2D(&self) -> *const c_void

Source§

fn get_edge_list(&self, edge_list: &mut Vector<Vec4f>) -> Result<()>

Returns a list of all edges. Read more
Source§

fn get_leading_edge_list( &self, leading_edge_list: &mut Vector<i32>, ) -> Result<()>

Returns a list of the leading edge ID connected to each triangle. Read more
Source§

fn get_triangle_list(&self, triangle_list: &mut Vector<Vec6f>) -> Result<()>

Returns a list of all triangles. Read more
Source§

fn get_vertex(&self, vertex: i32, first_edge: &mut i32) -> Result<Point2f>

Returns vertex location from vertex ID. Read more
Source§

fn get_vertex_def(&self, vertex: i32) -> Result<Point2f>

Returns vertex location from vertex ID. Read more
Source§

fn get_edge(&self, edge: i32, next_edge_type: i32) -> Result<i32>

Returns one of the edges related to the given edge. Read more
Source§

fn next_edge(&self, edge: i32) -> Result<i32>

Returns next edge around the edge origin. Read more
Source§

fn rotate_edge(&self, edge: i32, rotate: i32) -> Result<i32>

Returns another edge of the same quad-edge. Read more
Source§

fn sym_edge(&self, edge: i32) -> Result<i32>

Source§

fn edge_org(&self, edge: i32, orgpt: &mut Point2f) -> Result<i32>

Returns the edge origin. Read more
Source§

fn edge_org_def(&self, edge: i32) -> Result<i32>

Returns the edge origin. Read more
Source§

fn edge_dst(&self, edge: i32, dstpt: &mut Point2f) -> Result<i32>

Returns the edge destination. Read more
Source§

fn edge_dst_def(&self, edge: i32) -> Result<i32>

Returns the edge destination. Read more
Source§

impl Send for Subdiv2D

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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<Mat> ModifyInplace for Mat
where Mat: Boxed,

Source§

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
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.