Struct mgf::AABB
[−]
[src]
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.
AABB's 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>
Trait Implementations
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 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 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 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<RHS: BoundedBy<AABB>> Contains<RHS> for AABB[src]
fn contains(&self, rhs: &RHS) -> bool[src]
Returns true if the current object contains the argument.
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.
fn rotate(&self, q: Quaternion<f32>) -> AABB[src]
Rotate the AABB
fn surface_area(&self) -> f32[src]
Return a measure of the area of the object.
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 Contains<Point3<f32>> for AABB[src]
fn contains(&self, p: &Point3<f32>) -> bool[src]
Returns true if the current object contains the argument.
impl Intersects<Ray> for AABB[src]
fn intersection(&self, rhs: &Ray) -> Option<Intersection>[src]
Returns an Intersection if one exists.
impl Intersects<Segment> for AABB[src]
fn intersection(&self, rhs: &Segment) -> Option<Intersection>[src]
Returns an Intersection if one exists.
impl Copy for AABB[src]
impl Clone for AABB[src]
fn clone(&self) -> AABB[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 Debug for AABB[src]
impl MinDistance<Point3<f32>> for AABB[src]
impl Add<Vector3<f32>> for AABB[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, v: Vector3<f32>) -> Self[src]
Performs the + operation.
impl Sub<Vector3<f32>> for AABB[src]
type Output = Self
The resulting type after applying the - operator.
fn sub(self, v: Vector3<f32>) -> Self[src]
Performs the - operation.
impl AddAssign<Vector3<f32>> for AABB[src]
fn add_assign(&mut self, v: Vector3<f32>)[src]
Performs the += operation.
impl SubAssign<Vector3<f32>> for AABB[src]
fn sub_assign(&mut self, v: Vector3<f32>)[src]
Performs the -= operation.