Enum quicksilver::geom::Shape [−][src]
A universal shape union
Variants
Circle(Circle)
Rectangle(Rectangle)
Vector(Vector)
Methods
impl Shape
[src]
impl Shape
pub fn overlaps_circ(&self, circ: Circle) -> bool
[src]
pub fn overlaps_circ(&self, circ: Circle) -> bool
Check if the shape overlaps with a circle
pub fn overlaps_rect(&self, rect: Rectangle) -> bool
[src]
pub fn overlaps_rect(&self, rect: Rectangle) -> bool
Check if the shape overlaps with a rectangle
pub fn contains(&self, vec: Vector) -> bool
[src]
pub fn contains(&self, vec: Vector) -> bool
Check if the shape contains a vector
pub fn overlaps(&self, shape: Shape) -> bool
[src]
pub fn overlaps(&self, shape: Shape) -> bool
Check if the shape overlaps with another shape
pub fn translate(&self, vec: Vector) -> Shape
[src]
pub fn translate(&self, vec: Vector) -> Shape
Create a shape moved by a given amount
pub fn with_center(&self, vec: Vector) -> Shape
[src]
pub fn with_center(&self, vec: Vector) -> Shape
Create a copy of the shape with a given center
Trait Implementations
impl Clone for Shape
[src]
impl Clone for Shape
fn clone(&self) -> Shape
[src]
fn clone(&self) -> Shape
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Shape
[src]
impl Copy for Shape
impl Debug for Shape
[src]
impl Debug for Shape
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Shape
[src]
impl PartialEq for Shape
fn eq(&self, other: &Shape) -> bool
[src]
fn eq(&self, other: &Shape) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Shape) -> bool
[src]
fn ne(&self, other: &Shape) -> bool
This method tests for !=
.
impl Eq for Shape
[src]
impl Eq for Shape
impl Positioned for Shape
[src]
impl Positioned for Shape