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