pub struct AabbCollider { /* private fields */ }Expand description
An axis-aligned bounding box collider wrapping a Rect.
Implementations§
Source§impl AabbCollider
Implements Collider trait and convenience methods for AabbCollider.
impl AabbCollider
Implements Collider trait and convenience methods for AabbCollider.
Sourcepub fn from_center(center: Vector2D, width: f64, height: f64) -> AabbCollider
pub fn from_center(center: Vector2D, width: f64, height: f64) -> AabbCollider
Sourcepub fn collide_with_aabb(&self, other: &AabbCollider) -> Option<CollisionResult>
pub fn collide_with_aabb(&self, other: &AabbCollider) -> Option<CollisionResult>
Sourcepub fn collide_with_circle(
&self,
circle: &CircleCollider,
) -> Option<CollisionResult>
pub fn collide_with_circle( &self, circle: &CircleCollider, ) -> Option<CollisionResult>
Source§impl AabbCollider
impl AabbCollider
Trait Implementations§
Source§impl Clone for AabbCollider
impl Clone for AabbCollider
Source§fn clone(&self) -> AabbCollider
fn clone(&self) -> AabbCollider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Collider for AabbCollider
Implements the Collider trait for AabbCollider.
impl Collider for AabbCollider
Implements the Collider trait for AabbCollider.
Source§fn shape(&self) -> ColliderShape
fn shape(&self) -> ColliderShape
Returns the geometric shape of this collider. Read more
Source§fn bounding_box(&self) -> Rect
fn bounding_box(&self) -> Rect
Returns the axis-aligned bounding box that encloses this collider. Read more
impl Copy for AabbCollider
Source§impl Debug for AabbCollider
impl Debug for AabbCollider
Source§impl Default for AabbCollider
impl Default for AabbCollider
Source§fn default() -> AabbCollider
fn default() -> AabbCollider
Returns the “default value” for a type. Read more
Source§impl PartialEq for AabbCollider
impl PartialEq for AabbCollider
Source§fn eq(&self, other: &AabbCollider) -> bool
fn eq(&self, other: &AabbCollider) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AabbCollider
impl PartialOrd for AabbCollider
impl StructuralPartialEq for AabbCollider
Auto Trait Implementations§
impl Freeze for AabbCollider
impl RefUnwindSafe for AabbCollider
impl Send for AabbCollider
impl Sync for AabbCollider
impl Unpin for AabbCollider
impl UnsafeUnpin for AabbCollider
impl UnwindSafe for AabbCollider
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