[][src]Struct triangular::Triangulation

pub struct Triangulation<'a, T, V> where
    T: BaseFloat,
    V: Into<Vector2<T>>, 
{ /* fields omitted */ }

Implementations

impl<'a, T, V> Triangulation<'a, T, V> where
    T: BaseFloat,
    V: Into<Vector2<T>> + Copy
[src]

pub fn new(points: &'a [V]) -> Self[src]

Returns a new Triangulations object that holds the configuration and a reference to the points

use triangular::Triangulation;

let points = vec![(0.6, 1.1),
                  (0.2, 1.5),
                  (0.8, 1.6)];

let triangles = Triangulation::new(&points);

pub fn with_bounds(self, c1: V, c2: V) -> Self[src]

Return all Triangles calculated within the specified bounds

use triangular::Triangulation;

// build a set of points
let points = vec![(0.6, 1.1),
                  (0.2, 1.5),
                  (0.8, 1.6)];

let triangles = Triangulation::new(&points)
                    .with_bounds((0.0, 0.0), (2.0, 2.0))
                    .build();
assert_eq!(&*triangles, &[2, 1, 0]);

pub fn with_max_len(self, max_len: T) -> Self[src]

Return all Triangles Calculated with edges < max_len

use triangular::Triangulation;

// build a set of points
let points = vec![(0.6, 1.1),
                  (0.2, 1.5),
                  (0.8, 1.6)];

let triangles = Triangulation::new(&points)
                    .with_max_len(0.1)
                    .build();
assert_eq!(&*triangles, &[]);

pub fn build(self) -> Box<[usize]>[src]

Builds the triangulations and returns all indices of the generated triangles

use triangular::Triangulation;

// build a set of points
let points = vec![(0.6, 1.1),
                  (0.2, 1.5),
                  (0.8, 1.6)];

let triangles = Triangulation::new(&points)
                    .build();

Auto Trait Implementations

impl<'a, T, V> RefUnwindSafe for Triangulation<'a, T, V> where
    T: RefUnwindSafe,
    V: RefUnwindSafe

impl<'a, T, V> Send for Triangulation<'a, T, V> where
    T: Send,
    V: Send + Sync

impl<'a, T, V> Sync for Triangulation<'a, T, V> where
    T: Sync,
    V: Sync

impl<'a, T, V> Unpin for Triangulation<'a, T, V> where
    T: Unpin,
    V: Unpin

impl<'a, T, V> UnwindSafe for Triangulation<'a, T, V> where
    T: UnwindSafe,
    V: RefUnwindSafe + UnwindSafe

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.