[][src]Struct mgf::AABB

pub struct AABB {
    pub c: Point3<f32>,
    pub r: Vector3<f32>,
}

An Axis Aligned Bounding Box.

AABBs are closed boxes aligned to the axes of the coordinate system. AABBs are described by a point and three half widths.

AABBs being closed means that a point lying on the surface of the AABB is considered contained by the AABB.

Fields

c: Point3<f32>r: Vector3<f32>

Methods

impl AABB[src]

pub fn new(c: Point3<f32>, r: Vector3<f32>) -> Self[src]

Create a new AABB.

Trait Implementations

impl Add<Vector3<f32>> for AABB[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<f32> for AABB[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, s: f32) -> AABB[src]

Extend AABB

impl AddAssign<Vector3<f32>> for AABB[src]

impl Bound for AABB[src]

fn combine(a: &AABB, b: &AABB) -> AABB[src]

The returned AABB is the smallest volume possible that encloses both arguments. At least I think, I Can't remember if that claim is true. I'll have to check sometime.

impl BoundedBy<AABB> for Triangle[src]

impl BoundedBy<AABB> for Rectangle[src]

impl BoundedBy<AABB> for Sphere[src]

impl BoundedBy<AABB> for Capsule[src]

impl BoundedBy<AABB> for OBB[src]

impl BoundedBy<AABB> for Component[src]

impl BoundedBy<AABB> for Compound[src]

impl BoundedBy<Sphere> for AABB[src]

Taking the bounding sphere of an AABB creates a sphere that contains all of the extreme points of the AABB. Thus, a bounding sphere for an AABB created from another bounding sphere will be larger in size than the original sphere.

impl Clone for AABB[src]

impl Contains<AABB> for AABB[src]

impl Contains<Point3<f32>> for AABB[src]

impl Convex<Point3<f32>> for AABB[src]

impl Copy for AABB[src]

impl Debug for AABB[src]

impl<'de> Deserialize<'de> for AABB[src]

impl Div<f32> for AABB[src]

type Output = Self

The resulting type after applying the / operator.

fn div(self, s: f32) -> Self[src]

Compress AABB

impl<P: Particle> Intersects<AABB> for P[src]

impl Mul<f32> for AABB[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, s: f32) -> AABB[src]

Expand AABB

impl Overlaps<AABB> for AABB[src]

impl Overlaps<AABB> for Sphere[src]

impl Overlaps<Sphere> for AABB[src]

impl Serialize for AABB[src]

impl Shape for AABB[src]

impl Sub<Vector3<f32>> for AABB[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<f32> for AABB[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, s: f32) -> Self[src]

Shrink AABB

impl SubAssign<Vector3<f32>> for AABB[src]

impl Volumetric for AABB[src]

Auto Trait Implementations

impl RefUnwindSafe for AABB

impl Send for AABB

impl Sync for AABB

impl Unpin for AABB

impl UnwindSafe for AABB

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.