Struct polygon2::greiner_hormann::Polygon[][src]

pub struct Polygon<T> { /* fields omitted */ }

Implementations

impl<T> Polygon<T>[src]

pub fn new() -> Self[src]

impl<T> Polygon<T>[src]

pub fn iter(&self) -> PolygonIter<T>[src]

impl<T> Polygon<T> where
    T: Clone + Signed + PartialEq + PartialOrd,
    &'a T: Div<&'b T, Output = T> + Sub<&'b T, Output = T> + Add<&'b T, Output = T> + Mul<&'b T, Output = T>, 
[src]

pub fn add(&mut self, vertex: *mut Vertex<T>)[src]

pub fn insert(
    &mut self,
    vertex: *mut Vertex<T>,
    start: *mut Vertex<T>,
    end: *mut Vertex<T>
)
[src]

Insert and sort a vertex between a specified pair of vertices

pub fn next(&self, vertex: *mut Vertex<T>) -> *mut Vertex<T>[src]

Return the next non intersecting vertex after the one specified

pub fn first_intersect(&self) -> *mut Vertex<T>[src]

Return the first unchecked intersection point in the polygon

pub fn points(&self) -> Vec<[T; 2]>[src]

Return the polygon points as a list of points, in counter clock wise order clear consecutive equals points

pub fn points_rev(&self) -> Vec<[T; 2]>[src]

pub fn unprocessed(&self) -> bool[src]

Check if an unchecked intersection remain in the polygon

pub fn phase_one(&mut self, polygon: &mut Polygon<T>)[src]

pub fn phase_two(
    &mut self,
    polygon: &mut Polygon<T>,
    s_entry: bool,
    c_entry: bool
)
[src]

pub fn phase_three(&mut self, rev: bool) -> Vec<Vec<[T; 2]>>[src]

pub fn clip(
    &mut self,
    polygon: &mut Polygon<T>,
    s_entry: bool,
    c_entry: bool,
    rev: bool
) -> Vec<Vec<[T; 2]>>
[src]

pub fn union(&mut self, polygon: &mut Polygon<T>) -> Vec<Vec<[T; 2]>>[src]

pub fn intersection(&mut self, polygon: &mut Polygon<T>) -> Vec<Vec<[T; 2]>>[src]

pub fn difference(&mut self, polygon: &mut Polygon<T>) -> Vec<Vec<[T; 2]>>[src]

Trait Implementations

impl<T> Debug for Polygon<T> where
    T: Debug
[src]

impl<T> Drop for Polygon<T>[src]

impl<'slice, T> From<&'slice [[T; 2]]> for Polygon<T> where
    T: Clone + Zero + Signed + PartialEq + PartialOrd,
    &'a T: Div<&'b T, Output = T> + Sub<&'b T, Output = T> + Add<&'b T, Output = T> + Mul<&'b T, Output = T>, 
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Polygon<T> where
    T: RefUnwindSafe

impl<T> !Send for Polygon<T>

impl<T> !Sync for Polygon<T>

impl<T> Unpin for Polygon<T>

impl<T> UnwindSafe for Polygon<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.