pub struct AxisAlignedRectangle<T>where
T: Copy + Num + NumAssignOps + NumOps,{
pub point: Point<T>,
pub rectangle: Rectangle<T>,
}Expand description
axis aligned starting at x, y and ending at x + width, y + height (left to right, top to bottom)
Fields§
§point: Point<T>§rectangle: Rectangle<T>Implementations§
source§impl<T> AxisAlignedRectangle<T>where
T: Copy + Num + NumAssignOps + NumOps + PartialOrd + Float,
impl<T> AxisAlignedRectangle<T>where T: Copy + Num + NumAssignOps + NumOps + PartialOrd + Float,
source§impl<T> AxisAlignedRectangle<T>where
T: Copy + Num + NumAssignOps + NumOps,
impl<T> AxisAlignedRectangle<T>where T: Copy + Num + NumAssignOps + NumOps,
source§impl<T> AxisAlignedRectangle<T>where
T: Copy + Num + NumAssignOps + NumOps + Float,
impl<T> AxisAlignedRectangle<T>where T: Copy + Num + NumAssignOps + NumOps + Float,
pub fn from_two_point(p1: &Point<T>, p2: &Point<T>) -> Self
Trait Implementations§
source§impl<T> Clone for AxisAlignedRectangle<T>where
T: Copy + Num + NumAssignOps + NumOps + Clone,
impl<T> Clone for AxisAlignedRectangle<T>where T: Copy + Num + NumAssignOps + NumOps + Clone,
source§fn clone(&self) -> AxisAlignedRectangle<T>
fn clone(&self) -> AxisAlignedRectangle<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T> Debug for AxisAlignedRectangle<T>where
T: Copy + Num + NumAssignOps + NumOps + Debug,
impl<T> Debug for AxisAlignedRectangle<T>where T: Copy + Num + NumAssignOps + NumOps + Debug,
source§impl<T> PartialEq for AxisAlignedRectangle<T>where
T: Copy + Num + NumAssignOps + NumOps + PartialEq,
impl<T> PartialEq for AxisAlignedRectangle<T>where T: Copy + Num + NumAssignOps + NumOps + PartialEq,
source§fn eq(&self, other: &AxisAlignedRectangle<T>) -> bool
fn eq(&self, other: &AxisAlignedRectangle<T>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<T> RectangleSize<T> for AxisAlignedRectangle<T>where
T: Copy + Num + NumAssignOps + NumOps,
impl<T> RectangleSize<T> for AxisAlignedRectangle<T>where T: Copy + Num + NumAssignOps + NumOps,
A rectangle in 2D space with a width and height
source§impl<T> SizeForAxis<T> for AxisAlignedRectangle<T>where
T: Copy + Num + NumAssignOps,
impl<T> SizeForAxis<T> for AxisAlignedRectangle<T>where T: Copy + Num + NumAssignOps,
fn size_for_axis(&self, axis: Axis) -> T
impl<T> StructuralPartialEq for AxisAlignedRectangle<T>where T: Copy + Num + NumAssignOps + NumOps,
Auto Trait Implementations§
impl<T> RefUnwindSafe for AxisAlignedRectangle<T>where T: RefUnwindSafe,
impl<T> Send for AxisAlignedRectangle<T>where T: Send,
impl<T> Sync for AxisAlignedRectangle<T>where T: Sync,
impl<T> Unpin for AxisAlignedRectangle<T>where T: Unpin,
impl<T> UnwindSafe for AxisAlignedRectangle<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, U> Dividing<T> for Uwhere
U: QuarterRotation + VerticalDividingHelper<T>,
T: Copy,
impl<T, U> Dividing<T> for Uwhere U: QuarterRotation + VerticalDividingHelper<T>, T: Copy,
source§fn divide_vertical(&self, x: T) -> (U, U)
fn divide_vertical(&self, x: T) -> (U, U)
dividing a rectangle into two rectangles (vertical)
source§fn divide_horizontal(&self, y: T) -> (U, U)
fn divide_horizontal(&self, y: T) -> (U, U)
dividing a rectangle into two rectangles (horizontal)
source§fn divide(&self, v: T, axis: Axis) -> (Self, Self)where
Self: Sized,
fn divide(&self, v: T, axis: Axis) -> (Self, Self)where Self: Sized,
dividing a rectangle into two rectangles specified by axis
source§fn divide_by_values_and_axis(&self, values: &Vec<T>, axis: Axis) -> Vec<Self>where
Self: Sized + RectangleSize<T> + Clone,
T: Copy + Num + NumAssignOps,
fn divide_by_values_and_axis(&self, values: &Vec<T>, axis: Axis) -> Vec<Self>where Self: Sized + RectangleSize<T> + Clone, T: Copy + Num + NumAssignOps,
dividing a rectangle into specified number of rectangles specified by axis
source§fn divide_by_weights_and_axis(&self, weights: &Vec<T>, axis: Axis) -> Vec<Self>where
Self: Sized + RectangleSize<T> + Clone + SizeForAxis<T>,
T: Copy + for<'a> Sum<&'a T> + Num + NumAssignOps + NumOps,
fn divide_by_weights_and_axis(&self, weights: &Vec<T>, axis: Axis) -> Vec<Self>where Self: Sized + RectangleSize<T> + Clone + SizeForAxis<T>, T: Copy + for<'a> Sum<&'a T> + Num + NumAssignOps + NumOps,
dividing a rectangle into specified weights of rectangles specified by axis