pub struct Subdiv2D { /* private fields */ }Implementations§
Source§impl Subdiv2D
impl Subdiv2D
Sourcepub fn default() -> Result<Subdiv2D>
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.
Sourcepub fn new(rect: Rect) -> Result<Subdiv2D>
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
impl Boxed for Subdiv2D
Source§unsafe fn from_raw(ptr: <Subdiv2D as OpenCVFromExtern>::ExternReceive) -> Self
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
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
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
fn as_raw_mut( &mut self, ) -> <Subdiv2D as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
Source§impl Subdiv2DTrait for Subdiv2D
impl Subdiv2DTrait for Subdiv2D
fn as_raw_mut_Subdiv2D(&mut self) -> *mut c_void
Source§fn init_delaunay(&mut self, rect: Rect) -> Result<()>
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>
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<()>
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>
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>
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§impl Subdiv2DTraitConst for Subdiv2D
impl Subdiv2DTraitConst for Subdiv2D
fn as_raw_Subdiv2D(&self) -> *const c_void
Source§fn get_edge_list(&self, edge_list: &mut Vector<Vec4f>) -> Result<()>
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<()>
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<()>
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>
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>
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>
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>
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>
fn rotate_edge(&self, edge: i32, rotate: i32) -> Result<i32>
Returns another edge of the same quad-edge. Read more
fn sym_edge(&self, edge: i32) -> Result<i32>
Source§fn edge_org(&self, edge: i32, orgpt: &mut Point2f) -> Result<i32>
fn edge_org(&self, edge: i32, orgpt: &mut Point2f) -> Result<i32>
Returns the edge origin. Read more
impl Send for Subdiv2D
Auto Trait Implementations§
impl Freeze for Subdiv2D
impl RefUnwindSafe for Subdiv2D
impl !Sync for Subdiv2D
impl Unpin for Subdiv2D
impl UnwindSafe for Subdiv2D
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