[][src]Trait crystal_packing::traits::Intersect

pub trait Intersect {
    pub fn intersects(&self, other: &Self) -> bool;
pub fn area(&self) -> f64; }

Required methods

pub fn intersects(&self, other: &Self) -> bool[src]

pub fn area(&self) -> f64[src]

Loading content...

Implementors

impl Intersect for Atom2[src]

impl Intersect for Line2[src]

pub fn intersects(&self, other: &Self) -> bool[src]

Determine whether two line segments intersect

This calculates whether two lines intersect at a point contained within each line segment see this Wikipedia article for more information on the algorithm used for this calculation.

impl Intersect for LineShape[src]

pub fn intersects(&self, other: &Self) -> bool[src]

Check whether this shape intersects with another shape

A ShapeInstance is considered to intersect with another when one of it's components intersects with a component of the other shape. For a square, there is an intersection when a line from one square crosses the other. Each component item of self is checked against other.

impl Intersect for MolecularShape2[src]

Loading content...