Struct visioncortex::bound::BoundingRect[][src]

pub struct BoundingRect {
    pub left: i32,
    pub top: i32,
    pub right: i32,
    pub bottom: i32,
}

The rectangle that bounds an object

Fields

left: i32top: i32right: i32bottom: i32

Implementations

impl BoundingRect[src]

pub fn new_x_y_w_h(x: i32, y: i32, w: i32, h: i32) -> Self[src]

pub fn width(self) -> i32[src]

pub fn height(self) -> i32[src]

pub fn is_empty(self) -> bool[src]

pub fn center(self) -> PointI32[src]

pub fn sq_dist(self, other: Self) -> i32[src]

Calculates the squared distance betweeen the center of two BoundingRects.

pub fn aspect_ratio(self) -> f64[src]

pub fn aspect_ratio_doubled(self) -> i32[src]

pub fn add_x_y(&mut self, x: i32, y: i32)[src]

pub fn merge(&mut self, other: Self)[src]

pub fn clear(&mut self)[src]

pub fn hit(self, other: Self) -> bool[src]

pub fn clip(&mut self, other: Self)[src]

pub fn squared(self) -> Self[src]

pub fn translate(&mut self, p: PointI32)[src]

Trait Implementations

impl Bound for BoundingRect[src]

impl Clone for BoundingRect[src]

impl Copy for BoundingRect[src]

impl Debug for BoundingRect[src]

impl Default for BoundingRect[src]

impl Eq for BoundingRect[src]

impl PartialEq<BoundingRect> for BoundingRect[src]

impl StructuralEq for BoundingRect[src]

impl StructuralPartialEq for BoundingRect[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.