Struct box2d_rs::b2_collision::B2AABB
source · pub struct B2AABB {
pub lower_bound: B2vec2,
pub upper_bound: B2vec2,
}
Expand description
An axis aligned bounding box.
Fields§
§lower_bound: B2vec2
< the lower vertex
upper_bound: B2vec2
< the upper vertex
Implementations§
source§impl B2AABB
impl B2AABB
sourcepub fn get_center(self) -> B2vec2
pub fn get_center(self) -> B2vec2
Get the center of the AABB.
sourcepub fn get_extents(self) -> B2vec2
pub fn get_extents(self) -> B2vec2
Get the extents of the AABB (half-widths).
sourcepub fn get_perimeter(self) -> f32
pub fn get_perimeter(self) -> f32
Get the perimeter length
sourcepub fn combine_two(&mut self, aabb1: B2AABB, aabb2: B2AABB)
pub fn combine_two(&mut self, aabb1: B2AABB, aabb2: B2AABB)
Combine two AABBs into this one.
pub fn ray_cast( self, output: &mut B2rayCastOutput, input: &B2rayCastInput ) -> bool
Trait Implementations§
impl Copy for B2AABB
Auto Trait Implementations§
impl RefUnwindSafe for B2AABB
impl Send for B2AABB
impl Sync for B2AABB
impl Unpin for B2AABB
impl UnwindSafe for B2AABB
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