Struct three_d::AxisAlignedBoundingBox [−][src]
pub struct AxisAlignedBoundingBox { /* fields omitted */ }
Expand description
A bounding box that aligns with the x, y and z axes.
Implementations
impl AxisAlignedBoundingBox
[src]
impl AxisAlignedBoundingBox
[src]pub fn new_with_positions(positions: &[f32]) -> Self
[src]
pub fn new_with_positions(positions: &[f32]) -> Self
[src]Constructs a new bounding box and expands it such that all of the given positions are contained inside the bounding box. A position consisting of an x, y and z coordinate corresponds to three consecutive value in the positions array.
pub fn new_with_transformed_positions(
positions: &[f32],
transformation: &Mat4
) -> Self
[src]
pub fn new_with_transformed_positions(
positions: &[f32],
transformation: &Mat4
) -> Self
[src]Constructs a new bounding box and expands it such that all of the given positions transformed with the given transformation are contained inside the bounding box. A position consisting of an x, y and z coordinate corresponds to three consecutive value in the positions array.
pub fn expand(&mut self, positions: &[f32])
[src]
pub fn expand(&mut self, positions: &[f32])
[src]Expands the bounding box such that all of the given positions are contained inside the bounding box. A position consisting of an x, y and z coordinate corresponds to three consecutive value in the positions array.
pub fn expand_with_transformation(
&mut self,
positions: &[f32],
transformation: &Mat4
)
[src]
pub fn expand_with_transformation(
&mut self,
positions: &[f32],
transformation: &Mat4
)
[src]Expands the bounding box such that all of the given positions transformed with the given transformation are contained inside the bounding box. A position consisting of an x, y and z coordinate corresponds to three consecutive value in the positions array.
pub fn expand_with_aabb(&mut self, other: &AxisAlignedBoundingBox)
[src]
pub fn expand_with_aabb(&mut self, other: &AxisAlignedBoundingBox)
[src]Expand the bounding box such that it also contains the given other bounding box.
pub fn transform(&mut self, transformation: &Mat4)
[src]
pub fn transform(&mut self, transformation: &Mat4)
[src]Transforms the bounding box by the given transformation.
Note: Use new_with_transformed_positions instead of new_with_positions followed by this method to create a smaller bounding box.
Trait Implementations
impl Clone for AxisAlignedBoundingBox
[src]
impl Clone for AxisAlignedBoundingBox
[src]fn clone(&self) -> AxisAlignedBoundingBox
[src]
fn clone(&self) -> AxisAlignedBoundingBox
[src]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 AxisAlignedBoundingBox
[src]
impl Debug for AxisAlignedBoundingBox
[src]impl Copy for AxisAlignedBoundingBox
[src]
Auto Trait Implementations
impl RefUnwindSafe for AxisAlignedBoundingBox
impl Send for AxisAlignedBoundingBox
impl Sync for AxisAlignedBoundingBox
impl Unpin for AxisAlignedBoundingBox
impl UnwindSafe for AxisAlignedBoundingBox
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more