[][src]Struct collision::Aabb3

pub struct Aabb3<S> {
    pub min: Point3<S>,
    pub max: Point3<S>,
}

A three-dimensional AABB, aka a rectangular prism.

Fields

min: Point3<S>

Minimum point of the AABB

max: Point3<S>

Maximum point of the AABB

Methods

impl<S: BaseNum> Aabb3<S>
[src]

pub fn new(p1: Point3<S>, p2: Point3<S>) -> Aabb3<S>
[src]

Construct a new axis-aligned bounding box from two points.

pub fn to_corners(&self) -> [Point3<S>; 8]
[src]

Compute corners.

Trait Implementations

impl<S: BaseFloat> PlaneBound<S> for Aabb3<S>
[src]

fn relate_clip_space(&self, projection: Matrix4<S>) -> Relation
[src]

Classify the relation with a projection matrix.

impl<S: BaseFloat> Continuous<Aabb3<S>> for Ray3<S>
[src]

type Result = Point3<S>

Result returned by the intersection test

impl<S: BaseFloat> Continuous<Ray<S, Point3<S>, Vector3<S>>> for Aabb3<S>
[src]

type Result = Point3<S>

Result returned by the intersection test

impl<S: BaseFloat> Discrete<Aabb3<S>> for Ray3<S>
[src]

impl<S: BaseFloat> Discrete<Ray<S, Point3<S>, Vector3<S>>> for Aabb3<S>
[src]

impl<S: BaseFloat> Discrete<Aabb3<S>> for Aabb3<S>
[src]

impl<S: BaseNum> Contains<Point3<S>> for Aabb3<S>
[src]

impl<S: BaseNum> Contains<Aabb3<S>> for Aabb3<S>
[src]

impl<S: BaseFloat> Contains<Sphere<S>> for Aabb3<S>
[src]

impl<S: BaseNum> Contains<Line<S, Vector3<S>, Point3<S>>> for Aabb3<S>
[src]

impl<S: BaseFloat> Contains<Aabb3<S>> for Sphere<S>
[src]

impl<S: BaseNum> SurfaceArea for Aabb3<S>
[src]

type Scalar = S

Result type returned from surface area computation

impl<S: BaseNum> Union<Aabb3<S>> for Aabb3<S>
[src]

type Output = Aabb3<S>

Union shape created

impl<S: BaseFloat> Union<Sphere<S>> for Aabb3<S>
[src]

type Output = Aabb3<S>

Union shape created

impl<S: BaseFloat> Union<Aabb3<S>> for Sphere<S>
[src]

type Output = Sphere<S>

Union shape created

impl<S> ComputeBound<Aabb3<S>> for Cylinder<S> where
    S: BaseFloat
[src]

impl<S> ComputeBound<Aabb3<S>> for Capsule<S> where
    S: BaseFloat
[src]

impl<S> ComputeBound<Aabb3<S>> for Cuboid<S> where
    S: BaseFloat
[src]

impl<S> ComputeBound<Aabb3<S>> for Cube<S> where
    S: BaseFloat
[src]

impl<S> ComputeBound<Aabb3<S>> for ConvexPolyhedron<S> where
    S: BaseFloat
[src]

impl<S> ComputeBound<Aabb3<S>> for Primitive3<S> where
    S: BaseFloat
[src]

impl<S> ComputeBound<Aabb3<S>> for Quad<S> where
    S: BaseFloat
[src]

impl<S> ComputeBound<Aabb3<S>> for Sphere<S> where
    S: BaseFloat
[src]

impl<S: BaseNum> Aabb for Aabb3<S>
[src]

type Scalar = S

Scalar type

type Diff = Vector3<S>

Vector type

type Point = Point3<S>

Point type

fn zero() -> Self
[src]

Create a new empty AABB

fn dim(&self) -> Self::Diff
[src]

Return the dimensions of this AABB.

fn volume(&self) -> Self::Scalar
[src]

Return the volume this AABB encloses.

fn center(&self) -> Self::Point
[src]

Return the center point of this AABB.

fn grow(&self, p: Self::Point) -> Self
[src]

Returns a new AABB that is grown to include the given point.

fn add_v(&self, v: Self::Diff) -> Self
[src]

Add a vector to every point in the AABB, returning a new AABB.

fn mul_s(&self, s: Self::Scalar) -> Self
[src]

Multiply every point in the AABB by a scalar, returning a new AABB.

fn mul_v(&self, v: Self::Diff) -> Self
[src]

Multiply every point in the AABB by a vector, returning a new AABB.

impl<S: PartialEq> PartialEq<Aabb3<S>> for Aabb3<S>
[src]

impl<S: Clone> Clone for Aabb3<S>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<S: Copy> Copy for Aabb3<S>
[src]

impl<S: BaseNum> Debug for Aabb3<S>
[src]

Auto Trait Implementations

impl<S> Send for Aabb3<S> where
    S: Send

impl<S> Sync for Aabb3<S> where
    S: Sync

Blanket Implementations

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

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

type Owned = T

impl<T> From for T
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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