Struct adi_gpu_base::BBox [−][src]
pub struct BBox { /* fields omitted */ }
Bounding box
Methods
impl BBox
[src]
impl BBox
pub fn new(min: Vec3, max: Vec3) -> BBox
[src]
pub fn new(min: Vec3, max: Vec3) -> 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: Vec3) -> bool
[src]
pub fn collide_vec3(&self, p: Vec3) -> bool
Check 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) -> Vec3
Get the center of the BBox
.
Trait Implementations
impl Into<BCube> for BBox
[src]
impl Into<BCube> for BBox
impl Add<Vec3> for BBox
[src]
impl Add<Vec3> for BBox
type Output = BBox
The resulting type after applying the +
operator.
fn add(self, other: Vec3) -> <BBox as Add<Vec3>>::Output
[src]
fn add(self, other: Vec3) -> <BBox as Add<Vec3>>::Output
Performs the +
operation.
impl Sub<Vec3> for BBox
[src]
impl Sub<Vec3> for BBox
type Output = BBox
The resulting type after applying the -
operator.
fn sub(self, other: Vec3) -> <BBox as Sub<Vec3>>::Output
[src]
fn sub(self, other: Vec3) -> <BBox as Sub<Vec3>>::Output
Performs the -
operation.
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 Debug for BBox
[src]
impl Debug for BBox
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Copy for BBox
[src]
impl Copy for BBox