[][src]Trait quicksilver::geom::Shape

pub trait Shape {
    
#[must_use]
fn contains(
        &self,
        point: impl Into<Vector>
    ) -> bool;
#[must_use]
fn overlaps(
        &self,
        other: &impl Shape
    ) -> bool;
#[must_use]
fn center(&self) -> Vector;
#[must_use]
fn bounding_box(&self) -> Rectangle;
#[must_use]
fn translate(
        &self,
        amount: impl Into<Vector>
    ) -> Self
    where
        Self: Sized
;
#[must_use]
fn intersects(&self, line: &Line) -> bool { ... }
#[must_use]
fn overlaps_circle(&self, circle: &Circle) -> bool { ... }
#[must_use]
fn overlaps_rectangle(&self, rectangle: &Rectangle) -> bool { ... }
#[must_use]
fn constrain(&self, outer: &Rectangle) -> Self
    where
        Self: Sized
, { ... }
#[must_use]
fn with_center(
        &self,
        center: impl Into<Vector>
    ) -> Self
    where
        Self: Sized
, { ... } }

The collision and positional attributes of shapes

Required methods

If the point lies on the shape's boundary or within it

If any area is bounded by both either shape

The point all other points are equidistant to in the shape

A Rectangle that contains the entire shape

Create a copy of the shape with an offset center

Loading content...

Provided methods

If any area bounded by the shape falls on the line

If any area is bounded by both the shape and the circle

If any area is bounded by both the shape and the rectangle

Create a copy of the shape that is contained within the bound

Create a copy of the shape with an offset center

Loading content...

Implementors

impl Shape for Circle
[src]

impl Shape for Line
[src]

impl Shape for Rectangle
[src]

impl Shape for Triangle
[src]

impl Shape for Vector
[src]

Loading content...