[−][src]Struct plop::BBox
Single-precision bounding box
Methods
impl BBox
[src]
pub fn new(min: Vector, max: Vector) -> BBox
[src]
Create an new BBox
at position p
.
pub fn collide(&self, other: BBox) -> bool
[src]
Check if BBox
collides with other
BBox
.
pub fn collide_bcube(&self, bcube: BCube) -> bool
[src]
Check if BBox
collides with BCube
.
pub fn collide_vec3(&self, p: Vector) -> bool
[src]
Check if BBox
collides with point p
.
pub fn all_points(&self) -> [Vector; 8]
[src]
Get all 8 points of the BBox
.
pub fn side_points(&self) -> [Vector; 6]
[src]
Get all 6 sides of the BBox
as points.
pub fn center(&self) -> Vector
[src]
Get the center of the BBox
.
Trait Implementations
impl Copy for BBox
[src]
impl Clone for BBox
[src]
fn clone(&self) -> BBox
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Add<Vector> for BBox
[src]
type Output = BBox
The resulting type after applying the +
operator.
fn add(self, other: Vector) -> <BBox as Add<Vector>>::Output
[src]
impl Sub<Vector> for BBox
[src]
type Output = BBox
The resulting type after applying the -
operator.
fn sub(self, other: Vector) -> <BBox as Sub<Vector>>::Output
[src]
impl Debug for BBox
[src]
impl Into<BCube> for BBox
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,