pub struct Box2d {
pub halfsize: Vec2,
}Expand description
2D rectangle centered at the origin.
Fields§
§halfsize: Vec2Implementations§
Trait Implementations§
Source§impl CollidesRel2d<Point> for Box2d
impl CollidesRel2d<Point> for Box2d
Source§fn collides_rel(&self, _t: &Point, rel: &impl Transformation2d) -> bool
fn collides_rel(&self, _t: &Point, rel: &impl Transformation2d) -> bool
Checks whether objects collide. Read more
impl Copy for Box2d
Source§impl ExtremePoint2d for Box2d
impl ExtremePoint2d for Box2d
impl MinkowskiNegationIsIdentity for Box2d
Source§impl MinkowskiSum<Ball> for Box2d
impl MinkowskiSum<Ball> for Box2d
type Output = RoundedBox2d
Source§impl MinkowskiSum<Box2d> for Ball
impl MinkowskiSum<Box2d> for Ball
type Output = RoundedBox2d
Source§impl MinkowskiSum<Box2d> for Box2d
impl MinkowskiSum<Box2d> for Box2d
Source§impl PenetratesRel2d<Point> for Box2d
impl PenetratesRel2d<Point> for Box2d
Source§fn penetrates_rel(&self, t: &Point, rel: &impl Transformation2d) -> Option<Vec2>
fn penetrates_rel(&self, t: &Point, rel: &impl Transformation2d) -> Option<Vec2>
Source§impl SdfRel2dVector<Point> for Box2d
impl SdfRel2dVector<Point> for Box2d
impl StructuralPartialEq for Box2d
Source§impl SymmetricBoundingBox2d for Box2d
impl SymmetricBoundingBox2d for Box2d
Source§fn symmetric_bounding_box(&self) -> Box2d
fn symmetric_bounding_box(&self) -> Box2d
Computes the bounding box. Read more
Auto Trait Implementations§
impl Freeze for Box2d
impl RefUnwindSafe for Box2d
impl Send for Box2d
impl Sync for Box2d
impl Unpin for Box2d
impl UnsafeUnpin for Box2d
impl UnwindSafe for Box2d
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<A, B, T> Collides2d<B, T> for A
impl<A, B, T> Collides2d<B, T> for A
Source§impl<A, B, C> CollidesRel2d<B> for A
impl<A, B, C> CollidesRel2d<B> for A
Source§fn collides_rel(&self, t: &B, rel: &impl Transformation2d) -> bool
fn collides_rel(&self, t: &B, rel: &impl Transformation2d) -> bool
Checks whether objects collide. Read more
Source§impl<T, U, V> MinkowskiDifference<U> for Twhere
T: MinkowskiSum<U, Output = V>,
U: MinkowskiNegation,
impl<T, U, V> MinkowskiDifference<U> for Twhere
T: MinkowskiSum<U, Output = V>,
U: MinkowskiNegation,
type Output = V
Source§fn minkowski_difference(&self, t: &U) -> <T as MinkowskiDifference<U>>::Output
fn minkowski_difference(&self, t: &U) -> <T as MinkowskiDifference<U>>::Output
Source§impl<'l, A, B, C> MinkowskiDifferenceLifetimed<'l, B> for Awhere
B: 'l,
C: 'l,
A: MinkowskiDifference<B, Output = C>,
impl<'l, A, B, C> MinkowskiDifferenceLifetimed<'l, B> for Awhere
B: 'l,
C: 'l,
A: MinkowskiDifference<B, Output = C>,
type Output = C
fn minkowski_difference_lt( &self, t: &'l B, ) -> <A as MinkowskiDifferenceLifetimed<'l, B>>::Output
Source§impl<T> MinkowskiNegation for Twhere
T: MinkowskiNegationIsIdentity,
impl<T> MinkowskiNegation for Twhere
T: MinkowskiNegationIsIdentity,
Source§fn minkowski_negation(&self) -> T
fn minkowski_negation(&self) -> T
Computes Minkowski negation. (Reflection about the origin) Read more