Struct ami::BBox
[−]
[src]
pub struct BBox<T: Copy + Clone + From<i32> + Neg<Output = T>> { /* fields omitted */ }
Bounding box
Methods
impl<T> BBox<T> where
T: Copy + Clone + From<i32> + Add<Output = T> + Sub<Output = T> + AddAssign + SubAssign + MulAssign + DivAssign + Mul<Output = T> + Div<Output = T> + PartialOrd + Neg<Output = T> + Ord,
[src]
T: Copy + Clone + From<i32> + Add<Output = T> + Sub<Output = T> + AddAssign + SubAssign + MulAssign + DivAssign + Mul<Output = T> + Div<Output = T> + PartialOrd + Neg<Output = T> + Ord,
pub fn empty() -> BBox<T>
[src]
Create an new empty BBox
.
pub fn new(p: Vec3<T>) -> BBox<T>
[src]
Create an new BBox
at position p
.
pub fn extend(&mut self, p: Vec3<T>)
[src]
Extend the BBox
pub fn contains(&self, p: Vec3<T>) -> bool
[src]
Check if BBox
contains point p
.
pub fn to_point_pair(&self) -> (Vec3<T>, Vec3<T>)
[src]
Get two opposite points that are the bounds of the BBox.
pub fn all_points(&self) -> [Vec3<T>; 7]
[src]
Get all 6 points or the BBox
.
pub fn pn_pair_from_normal(&self, normal: Vec3<f32>) -> (Vec3<T>, Vec3<T>)
[src]
Get a positive and negative pair of opposite points that are the bounds of the BBox, based around a normal.
Trait Implementations
impl<T: Clone + Copy + Clone + From<i32> + Neg<Output = T>> Clone for BBox<T>
[src]
fn clone(&self) -> BBox<T>
[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<T: Copy + Copy + Clone + From<i32> + Neg<Output = T>> Copy for BBox<T>
[src]
impl<T> Debug for BBox<T> where
T: Debug + Copy + Clone + From<i32> + Neg<Output = T>,
[src]
T: Debug + Copy + Clone + From<i32> + Neg<Output = T>,