Struct implicit::geom::Rect
[−]
[src]
pub struct Rect { pub top_left: Point, pub bottom_right: Point, }
Fields
top_left: Point
bottom_right: Point
Methods
impl Rect
[src]
fn centered_with_radius(p1: &Point, radius: f32) -> Rect
fn from_points(p1: &Point, p2: &Point) -> Rect
fn from_point_and_size(point: &Point, size: &Vector) -> Rect
fn null() -> Rect
fn null_at(point: &Point) -> Rect
fn expand(&self, left: f32, top: f32, right: f32, bottom: f32) -> Rect
fn width(&self) -> f32
fn height(&self) -> f32
fn top_left(&self) -> Point
fn bottom_right(&self) -> Point
fn bottom_left(&self) -> Point
fn top_right(&self) -> Point
fn expanded_by(&self, point: &Point) -> Rect
fn is_null(&self) -> bool
fn expand_to_include(&mut self, point: &Point)
fn union_with(&self, other: &Rect) -> Rect
fn contains(&self, p: &Point) -> bool
fn does_intersect(&self, other: &Rect) -> bool
fn intersect_with(&self, other: &Rect) -> Rect
fn midpoint(&self) -> Point
fn split_quad(&self) -> [Rect; 4]
fn close_to(&self, other: &Rect, epsilon: f32) -> bool
Trait Implementations
impl PartialOrd for Rect
[src]
fn partial_cmp(&self, __arg_0: &Rect) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Rect) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Rect) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Rect) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Rect) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq for Rect
[src]
fn eq(&self, __arg_0: &Rect) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Rect) -> bool
This method tests for !=
.
impl Copy for Rect
[src]
impl Clone for Rect
[src]
fn clone(&self) -> Rect
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more