[][src]Struct tessellations::tessellationfigure::TessellationFigure

pub struct TessellationFigure {
    pub lines: Vec<TessellationLine>,
    pub gridincx: f32,
    pub gridincy: f32,
    pub shiftx: f32,
    pub shifty: f32,
    pub rotdiv: u32,
    pub is_reversed: bool,
    pub shape: TessellationShape,
}

Figure type with lines

Fields

lines: Vec<TessellationLine>gridincx: f32gridincy: f32shiftx: f32shifty: f32rotdiv: u32is_reversed: boolshape: TessellationShape

Methods

impl TessellationFigure[src]

pub fn new() -> Self[src]

pub fn append(&mut self, line: TessellationLine)[src]

Append line to

pub fn points(&self) -> Vec<Point>[src]

Returns a list of the points and transformed points in the order of the figure.

pub fn hitline(&self, point: Point, rectsize: f32) -> Option<PointIndexPath>[src]

Check if a point falls on a line within rectsize of all the lines

pub fn hitpoints(&self, point: Point, rectsize: f32) -> Option<PointIndexPath>[src]

Check if a point falls on a line within rectsize of all the lines

pub fn insert(&mut self, point_index_path: PointIndexPath, point: Point)[src]

Insert a point after point_index_path

pub fn update(&mut self, point_index_path: PointIndexPath, point: Point)[src]

Update a point at point_index_path

impl TessellationFigure[src]

pub fn brick() -> Self[src]

a basic figure a brick

impl TessellationFigure[src]

pub fn diamond() -> Self[src]

basic figure a hexagon

impl TessellationFigure[src]

pub fn hexagon() -> Self[src]

basic figure a hexagon

impl TessellationFigure[src]

pub fn square() -> Self[src]

basic figure a square

impl TessellationFigure[src]

pub fn square90() -> Self[src]

impl TessellationFigure[src]

pub fn triangle() -> Self[src]

a basic figure triangle

Trait Implementations

impl Debug for TessellationFigure[src]

impl Default for TessellationFigure[src]

impl<'de> Deserialize<'de> for TessellationFigure[src]

impl Serialize for TessellationFigure[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[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.