[−][src]Struct voronoice::BoundingBox
Defines a rectangular bounding box.
Implementations
impl BoundingBox
[src]
pub fn new(origin: Point, width: f64, height: f64) -> Self
[src]
Constructs a new bounding box.
Arguments
origin
- The position of the center of the bounding boxwidth
- The bounding box's widthheight
- The bounding box's height
pub fn new_centered(width: f64, height: f64) -> Self
[src]
Constructs a new bounding box centeterd at origin with the provided width and height.
pub fn new_centered_square(width: f64) -> Self
[src]
Constructs a new square bounding box centeterd at origin with the provided width.
pub fn center(&self) -> &Point
[src]
Gets the position of the box's center.
pub fn top_right(&self) -> &Point
[src]
Gets the position of the top right corner of the bounding box.
pub fn width(&self) -> f64
[src]
Getst the width of the bounding box.
pub fn height(&self) -> f64
[src]
Getst the height of the bounding box.
pub fn is_inside(&self, point: &Point) -> bool
[src]
Returns whether a given point is inside (or on the edges) of the bounding box.
Trait Implementations
impl Clone for BoundingBox
[src]
pub fn clone(&self) -> BoundingBox
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BoundingBox
[src]
impl Default for BoundingBox
[src]
Auto Trait Implementations
impl RefUnwindSafe for BoundingBox
[src]
impl Send for BoundingBox
[src]
impl Sync for BoundingBox
[src]
impl Unpin for BoundingBox
[src]
impl UnwindSafe for BoundingBox
[src]
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>,