Enum quicksilver::geom::Shape
[−]
[src]
pub enum Shape { Circ(Circle), Line(Line), Rect(Rectangle), Vect(Vector), }
A universal shape union
Variants
Circ(Circle)
Line(Line)
Rect(Rectangle)
Vect(Vector)
Methods
impl Shape
[src]
fn overlaps_circ(&self, circ: Circle) -> bool
[src]
Check if the shape overlaps with a circle
fn overlaps_rect(&self, rect: Rectangle) -> bool
[src]
Check if the shape overlaps with a rectangle
fn intersects(&self, line: Line) -> bool
[src]
Check if the shape intersects with a line
fn contains(&self, vec: Vector) -> bool
[src]
Check if the shape contains a vector
fn overlaps(&self, shape: Shape) -> bool
[src]
Check if the shape overlaps with another shape
fn translate(&self, vec: Vector) -> Shape
[src]
Create a shape moved by a given amount
fn with_center(&self, vec: Vector) -> Shape
[src]
Create a copy of the shape with a given center
fn bounding_box(&self) -> Rectangle
[src]
Find the smallest bounding box that contains the shape
fn center(&self) -> Vector
[src]
Find the center of the shape
Trait Implementations
impl Clone for Shape
[src]
fn clone(&self) -> Shape
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Shape
[src]
impl Debug for Shape
[src]
impl PartialEq for Shape
[src]
fn eq(&self, __arg_0: &Shape) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Shape) -> bool
[src]
This method tests for !=
.