[][src]Struct tiny_rpg::math::Rectangle

pub struct Rectangle { /* fields omitted */ }

Methods

impl Rectangle[src]

pub fn new(x: i32, y: i32, width: u32, height: u32) -> Rectangle[src]

pub fn get_point(&self) -> Point[src]

pub fn get_dimension(&self) -> Dimension[src]

pub fn move_x(&mut self, amount_x: i32)[src]

pub fn move_y(&mut self, amount_y: i32)[src]

pub fn move_xy(&mut self, amount: Point)[src]

pub fn x(&self) -> i32[src]

pub fn y(&self) -> i32[src]

pub fn width(&self) -> u32[src]

pub fn height(&self) -> u32[src]

pub fn is_colliding(&self, other_rectangle: Rectangle) -> bool[src]

pub fn is_not_colliding(&self, other_rectangle: Rectangle) -> bool[src]

pub fn y_max(&self) -> i32[src]

pub fn x_max(&self) -> i32[src]

pub fn y_min(&self) -> i32[src]

pub fn x_min(&self) -> i32[src]

Trait Implementations

impl Clone for Rectangle[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Rectangle> for Rectangle[src]

impl Copy for Rectangle[src]

impl Eq for Rectangle[src]

impl Debug for Rectangle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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

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

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