Struct mgf::AABB
[−]
[src]
pub struct AABB {
pub c: Point3<f32>,
pub r: Vector3<f32>,
}Axis Aligned Bounding Boxes are closed boxes aligned to the axes of the coordinate system. AABBs are described by a point and three half widths.
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<T: BoundedBy<AABB>> Collider<Contains, T> for AABB[src]
fn check_collision(&self, b: &T) -> Option<Contains>[src]
Returns the first collision found if any exists.
fn collide<F: FnMut(CollisionType)>(&self, other: &T, callback: F) -> bool[src]
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
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]
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 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.
impl Shape for AABB[src]
fn center(&self) -> Point3<f32>[src]
Returns the center of mass of the geometry, assuming a regular density.
fn set_pos(&mut self, p: Point3<f32>)[src]
Sets the center of the shape to p.
impl Collider<Contains, Point3<f32>> for AABB[src]
fn check_collision(&self, p: &Point3<f32>) -> Option<Contains>[src]
Returns the first collision found if any exists.
fn collide<F: FnMut(CollisionType)>(&self, other: &T, callback: F) -> bool[src]
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
impl Collider<Intersection, Ray> for AABB[src]
fn collide<F: FnMut(Intersection)>(&self, rhs: &Ray, callback: F) -> bool[src]
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
fn check_collision(&self, other: &T) -> Option<CollisionType>[src]
Returns the first collision found if any exists.