[−][src]Struct collision::Aabb3
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_plane(&self, plane: Plane<S>) -> Relation
[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
fn intersection(&self, aabb: &Aabb3<S>) -> Option<Point3<S>>
[src]
impl<S: BaseFloat> Continuous<Ray<S, Point3<S>, Vector3<S>>> for Aabb3<S>
[src]
type Result = Point3<S>
Result returned by the intersection test
fn intersection(&self, ray: &Ray3<S>) -> Option<Point3<S>>
[src]
impl<S: BaseFloat> Discrete<Aabb3<S>> for Ray3<S>
[src]
fn intersects(&self, aabb: &Aabb3<S>) -> bool
[src]
impl<S: BaseFloat> Discrete<Ray<S, Point3<S>, Vector3<S>>> for Aabb3<S>
[src]
fn intersects(&self, ray: &Ray3<S>) -> bool
[src]
impl<S: BaseFloat> Discrete<Aabb3<S>> for Aabb3<S>
[src]
fn intersects(&self, aabb: &Aabb3<S>) -> bool
[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]
impl<S: BaseNum> Union<Aabb3<S>> for Aabb3<S>
[src]
impl<S: BaseFloat> Union<Sphere<S>> for Aabb3<S>
[src]
impl<S: BaseFloat> Union<Aabb3<S>> for Sphere<S>
[src]
impl<S> ComputeBound<Aabb3<S>> for Cylinder<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
impl<S> ComputeBound<Aabb3<S>> for Capsule<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
impl<S> ComputeBound<Aabb3<S>> for Cuboid<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
impl<S> ComputeBound<Aabb3<S>> for Cube<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
impl<S> ComputeBound<Aabb3<S>> for ConvexPolyhedron<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
impl<S> ComputeBound<Aabb3<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
impl<S> ComputeBound<Aabb3<S>> for Quad<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
impl<S> ComputeBound<Aabb3<S>> for Sphere<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[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 new(p1: Point3<S>, p2: Point3<S>) -> Aabb3<S>
[src]
fn min(&self) -> Point3<S>
[src]
fn max(&self) -> Point3<S>
[src]
fn add_margin(&self, margin: Self::Diff) -> Self
[src]
fn transform<T>(&self, transform: &T) -> Self where
T: Transform<Point3<S>>,
[src]
T: Transform<Point3<S>>,
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: Copy> Copy for Aabb3<S>
[src]
impl<S: PartialEq> PartialEq<Aabb3<S>> for Aabb3<S>
[src]
impl<S: Clone> Clone for Aabb3<S>
[src]
fn clone(&self) -> Aabb3<S>
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<S: BaseNum> Debug for Aabb3<S>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,