[][src]Struct quicksilver::geom::Rectangle

pub struct Rectangle {
    pub pos: Vector,
    pub size: Vector,
}

A rectangle with a top-left position and a size

Fields

The top-left coordinate of the rectangle

The width and height of the rectangle

Methods

impl Rectangle
[src]

Create a rectangle from a top-left vector and a size vector

Create a rectangle at the origin with the given size

Create a rectangle with a given center and Cuboid from ncollide

Convert this rect into an ncollide Cuboid2

Convert this rect into an ncollide AABB2

Get the top left coordinate of the Rectangle

Get the x-coordinate of the Rectangle (The origin of a Rectangle is at the top left)

Get the y-coordinate of the Rectangle (The origin of a Rectangle is at the top left)

Get the size of the Rectangle

Get the height of the Rectangle

Get the width of the Rectangle

Trait Implementations

impl Shape for Rectangle
[src]

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

Create a copy of the shape with an offset center

impl Drawable for Rectangle
[src]

impl PartialEq<Rectangle> for Rectangle
[src]

This method tests for !=.

impl From<AABB<f32>> for Rectangle
[src]

impl Clone for Rectangle
[src]

Performs copy-assignment from source. Read more

impl Copy for Rectangle
[src]

impl Eq for Rectangle
[src]

impl Default for Rectangle
[src]

impl Debug for Rectangle
[src]

impl Serialize for Rectangle
[src]

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

Auto Trait Implementations

impl Send for Rectangle

impl Sync for Rectangle

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

Sets value as a parameter of self.

impl<T> Erased for T

impl<T> Scalar for T where
    T: Copy + PartialEq<T> + Any + Debug
[src]

Tests if Self the same as the type T Read more

impl<T> Same for T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]