pub struct Bounds2D { /* private fields */ }Expand description
Axis-aligned 2D bounding rectangle (min, max) used by 2D spatial indices and samplers.
Implementations§
Source§impl Bounds2D
Geometric helpers for axis-aligned 2D bounds Bounds2D.
impl Bounds2D
Geometric helpers for axis-aligned 2D bounds Bounds2D.
Sourcepub fn from_center_half(center: Vec2, half_extents: Vec2) -> Self
pub fn from_center_half(center: Vec2, half_extents: Vec2) -> Self
Sourcepub fn contains_point(&self, point: Vec2) -> bool
pub fn contains_point(&self, point: Vec2) -> bool
Sourcepub fn intersects(&self, other: Self) -> bool
pub fn intersects(&self, other: Self) -> bool
Sourcepub fn min_dist_sq_to_point(&self, point: Vec2) -> f32
pub fn min_dist_sq_to_point(&self, point: Vec2) -> f32
Trait Implementations§
impl Copy for Bounds2D
impl StructuralPartialEq for Bounds2D
Auto Trait Implementations§
impl Forget for Bounds2D
impl Freeze for Bounds2D
impl Move for Bounds2D
impl RefUnwindSafe for Bounds2D
impl Send for Bounds2D
impl Sync for Bounds2D
impl Unpin for Bounds2D
impl UnsafeUnpin for Bounds2D
impl UnwindSafe for Bounds2D
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