Struct ami::BBox [−][src]
pub struct BBox { /* fields omitted */ }Bounding box
Methods
impl BBox[src]
impl BBoxpub fn new(min: Vec3, max: Vec3) -> BBox[src]
pub fn new(min: Vec3, max: Vec3) -> BBoxCreate an new BBox at position p.
pub fn collide(&self, other: BBox) -> bool[src]
pub fn collide(&self, other: BBox) -> boolCheck if BBox collides with other BBox.
pub fn collide_bcube(&self, bcube: BCube) -> bool[src]
pub fn collide_bcube(&self, bcube: BCube) -> boolCheck if BBox collides with BCube.
pub fn collide_vec3(&self, p: Vec3) -> bool[src]
pub fn collide_vec3(&self, p: Vec3) -> boolCheck if BBox collides with point p.
pub fn all_points(&self) -> [Vec3; 8][src]
pub fn all_points(&self) -> [Vec3; 8]Get all 8 points of the BBox.
pub fn side_points(&self) -> [Vec3; 6][src]
pub fn side_points(&self) -> [Vec3; 6]Get all 6 sides of the BBox as points.
pub fn center(&self) -> Vec3[src]
pub fn center(&self) -> Vec3Get the center of the BBox.
Trait Implementations
impl Clone for BBox[src]
impl Clone for BBoxfn clone(&self) -> BBox[src]
fn clone(&self) -> BBoxReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Copy for BBox[src]
impl Copy for BBoximpl Debug for BBox[src]
impl Debug for BBoxfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Sub<Vec3> for BBox[src]
impl Sub<Vec3> for BBoxtype Output = BBox
The resulting type after applying the - operator.
fn sub(self, other: Vec3) -> Self::Output[src]
fn sub(self, other: Vec3) -> Self::OutputPerforms the - operation.
impl Add<Vec3> for BBox[src]
impl Add<Vec3> for BBoxtype Output = BBox
The resulting type after applying the + operator.
fn add(self, other: Vec3) -> Self::Output[src]
fn add(self, other: Vec3) -> Self::OutputPerforms the + operation.
impl Into<BCube> for BBox[src]
impl Into<BCube> for BBox