#[repr(C)]pub struct BoundingBox {
pub min: Vector3,
pub max: Vector3,
}Fields§
§min: Vector3§max: Vector3Implementations§
Source§impl BoundingBox
impl BoundingBox
Sourcepub fn check_collision_boxes(&self, box2: BoundingBox) -> bool
pub fn check_collision_boxes(&self, box2: BoundingBox) -> bool
Detects collision between two boxes.
Sourcepub fn check_collision_box_sphere(
&self,
center_sphere: impl Into<Vector3>,
radius_sphere: f32,
) -> bool
pub fn check_collision_box_sphere( &self, center_sphere: impl Into<Vector3>, radius_sphere: f32, ) -> bool
Detects collision between box and sphere.
Sourcepub fn get_ray_collision_box(&self, ray: Ray) -> RayCollision
pub fn get_ray_collision_box(&self, ray: Ray) -> RayCollision
Detects collision between ray and box.
Source§impl BoundingBox
impl BoundingBox
pub fn new(min: Vector3, max: Vector3) -> BoundingBox
Trait Implementations§
Source§impl Clone for BoundingBox
impl Clone for BoundingBox
Source§fn clone(&self) -> BoundingBox
fn clone(&self) -> BoundingBox
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BoundingBox
impl Debug for BoundingBox
Source§impl Default for BoundingBox
impl Default for BoundingBox
Source§fn default() -> BoundingBox
fn default() -> BoundingBox
Returns the “default value” for a type. Read more
Source§impl From<&BoundingBox> for BoundingBox
impl From<&BoundingBox> for BoundingBox
Source§fn from(v: &BoundingBox) -> BoundingBox
fn from(v: &BoundingBox) -> BoundingBox
Converts to this type from the input type.
Source§impl From<BoundingBox> for BoundingBox
impl From<BoundingBox> for BoundingBox
Source§fn from(r: BoundingBox) -> BoundingBox
fn from(r: BoundingBox) -> BoundingBox
Converts to this type from the input type.
Source§impl From<BoundingBox> for BoundingBox
impl From<BoundingBox> for BoundingBox
Source§fn from(v: BoundingBox) -> BoundingBox
fn from(v: BoundingBox) -> BoundingBox
Converts to this type from the input type.
Source§impl PartialEq for BoundingBox
impl PartialEq for BoundingBox
impl Copy for BoundingBox
impl StructuralPartialEq for BoundingBox
Auto Trait Implementations§
impl Freeze for BoundingBox
impl RefUnwindSafe for BoundingBox
impl Send for BoundingBox
impl Sync for BoundingBox
impl Unpin for BoundingBox
impl UnsafeUnpin for BoundingBox
impl UnwindSafe for BoundingBox
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