Struct ami::BBox [−][src]
pub struct BBox { /* fields omitted */ }
Single-precision bounding box
Methods
impl BBox
[src]
impl BBox
pub fn new(min: Vector, max: Vector) -> BBox
[src]
pub fn new(min: Vector, max: Vector) -> BBox
Create an new BBox
at position p
.
pub fn collide(&self, other: BBox) -> bool
[src]
pub fn collide(&self, other: BBox) -> bool
Check if BBox
collides with other
BBox
.
pub fn collide_bcube(&self, bcube: BCube) -> bool
[src]
pub fn collide_bcube(&self, bcube: BCube) -> bool
Check if BBox
collides with BCube
.
pub fn collide_vec3(&self, p: Vector) -> bool
[src]
pub fn collide_vec3(&self, p: Vector) -> bool
Check if BBox
collides with point p
.
pub fn all_points(&self) -> [Vector; 8]
[src]
pub fn all_points(&self) -> [Vector; 8]
Get all 8 points of the BBox
.
pub fn side_points(&self) -> [Vector; 6]
[src]
pub fn side_points(&self) -> [Vector; 6]
Get all 6 sides of the BBox
as points.
pub fn center(&self) -> Vector
[src]
pub fn center(&self) -> Vector
Get the center of the BBox
.
Trait Implementations
impl Clone for BBox
[src]
impl Clone for BBox
fn clone(&self) -> BBox
[src]
fn clone(&self) -> BBox
Returns 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 BBox
impl Debug for BBox
[src]
impl Debug for BBox
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Sub<Vector> for BBox
[src]
impl Sub<Vector> for BBox
type Output = BBox
The resulting type after applying the -
operator.
fn sub(self, other: Vector) -> Self::Output
[src]
fn sub(self, other: Vector) -> Self::Output
Performs the -
operation.
impl Add<Vector> for BBox
[src]
impl Add<Vector> for BBox
type Output = BBox
The resulting type after applying the +
operator.
fn add(self, other: Vector) -> Self::Output
[src]
fn add(self, other: Vector) -> Self::Output
Performs the +
operation.
impl Into<BCube> for BBox
[src]
impl Into<BCube> for BBox