[−][src]Struct geom::bounds::Bounds
Represents a rectangular boundary of Pt2D
points.
Fields
min_x: f64
min_y: f64
max_x: f64
max_y: f64
Implementations
impl Bounds
[src]
pub fn new() -> Bounds
[src]
A boundary including no points.
pub fn from(pts: &Vec<Pt2D>) -> Bounds
[src]
Create a boundary covering some points.
pub fn update(&mut self, pt: Pt2D)
[src]
Update the boundary to include this point.
pub fn union(&mut self, other: Bounds)
[src]
Unions two boundaries.
pub fn contains(&self, pt: Pt2D) -> bool
[src]
True if the point is within the boundary.
pub fn as_bbox(&self) -> Rect
[src]
Converts the boundary to the format used by aabb_quadtree
.
pub fn get_rectangle(&self) -> Polygon
[src]
Creates a rectangle covering this boundary.
pub fn width(&self) -> f64
[src]
The width of this boundary.
pub fn height(&self) -> f64
[src]
The height of this boundary.
pub fn center(&self) -> Pt2D
[src]
The center point of this boundary.
Trait Implementations
impl Clone for Bounds
[src]
impl Debug for Bounds
[src]
impl<'de> Deserialize<'de> for Bounds
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Bounds
[src]
Auto Trait Implementations
impl RefUnwindSafe for Bounds
impl Send for Bounds
impl Sync for Bounds
impl Unpin for Bounds
impl UnwindSafe for Bounds
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,