Struct ami::BBox
[−]
[src]
pub struct BBox { /* fields omitted */ }
Bounding box
Methods
impl BBox
[src]
pub fn new(min: Vec3, max: Vec3) -> 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: Vec3) -> bool
[src]
Check if BBox
collides with point p
.
pub fn all_points(&self) -> [Vec3; 8]
[src]
Get all 8 points of the BBox
.
pub fn center(&self) -> Vec3
[src]
Get the center of the BBox
.
Trait Implementations
impl Clone for BBox
[src]
fn clone(&self) -> BBox
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for BBox
[src]
impl Debug for BBox
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Sub<Vec3> for BBox
[src]
type Output = BBox
The resulting type after applying the -
operator.
fn sub(self, other: Vec3) -> Self::Output
[src]
Performs the -
operation.