Struct visioncortex::bound::BoundingRect [−][src]
The rectangle that bounds an object
Fields
left: i32top: i32right: i32bottom: i32Implementations
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]
fn clone(&self) -> BoundingRect[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for BoundingRect[src]
impl Debug for BoundingRect[src]
impl Default for BoundingRect[src]
fn default() -> BoundingRect[src]
impl Eq for BoundingRect[src]
impl PartialEq<BoundingRect> for BoundingRect[src]
fn eq(&self, other: &BoundingRect) -> bool[src]
fn ne(&self, other: &BoundingRect) -> bool[src]
impl StructuralEq for BoundingRect[src]
impl StructuralPartialEq for BoundingRect[src]
Auto Trait Implementations
impl RefUnwindSafe for BoundingRect
impl Send for BoundingRect
impl Sync for BoundingRect
impl Unpin for BoundingRect
impl UnwindSafe for BoundingRect
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,