Struct collision::Aabb3
[−]
[src]
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> ComputeBound<Aabb3<S>> for Cylinder<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
Compute the bounding volume
impl<S> ComputeBound<Aabb3<S>> for Capsule<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
Compute the bounding volume
impl<S> ComputeBound<Aabb3<S>> for Cuboid<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
Compute the bounding volume
impl<S> ComputeBound<Aabb3<S>> for Cube<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
Compute the bounding volume
impl<S> ComputeBound<Aabb3<S>> for ConvexPolyhedron<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
Compute the bounding volume
impl<S> ComputeBound<Aabb3<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
Compute the bounding volume
impl<S> ComputeBound<Aabb3<S>> for Quad<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
Compute the bounding volume
impl<S> ComputeBound<Aabb3<S>> for Sphere<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
Compute the bounding volume
impl<S: Copy> Copy for Aabb3<S>
[src]
impl<S: Clone> Clone for Aabb3<S>
[src]
fn clone(&self) -> Aabb3<S>
[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<S: PartialEq> PartialEq for Aabb3<S>
[src]
fn eq(&self, __arg_0: &Aabb3<S>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Aabb3<S>) -> bool
[src]
This method tests for !=
.
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]
Create a new AABB using two points as opposing corners.
fn min(&self) -> Point3<S>
[src]
Return a shared reference to the point nearest to (-inf, -inf).
fn max(&self) -> Point3<S>
[src]
Return a shared reference to the point nearest to (inf, inf).
fn add_margin(&self, margin: Self::Diff) -> Self
[src]
Add a margin of the given width around the AABB, returning a new AABB.
fn transform<T>(&self, transform: &T) -> Self where
T: Transform<Point3<S>>,
[src]
T: Transform<Point3<S>>,
Apply an arbitrary transform to the corners of this bounding box, return a new conservative bound. Read more
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: BaseNum> Debug for Aabb3<S>
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
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<Line3<S>> for Aabb3<S>
[src]
impl<S: BaseNum> Union for Aabb3<S>
[src]
type Output = Aabb3<S>
Union shape created
fn union(&self, other: &Aabb3<S>) -> Aabb3<S>
[src]
Build the union shape of self and the given shape.
impl<S: BaseFloat> Union<Sphere<S>> for Aabb3<S>
[src]
type Output = Aabb3<S>
Union shape created
fn union(&self, sphere: &Sphere<S>) -> Aabb3<S>
[src]
Build the union shape of self and the given shape.
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]
Intersection test
impl<S: BaseFloat> Continuous<Ray3<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]
Intersection test
impl<S: BaseFloat> Discrete<Aabb3<S>> for Ray3<S>
[src]
fn intersects(&self, aabb: &Aabb3<S>) -> bool
[src]
Intersection test
impl<S: BaseFloat> Discrete<Ray3<S>> for Aabb3<S>
[src]
fn intersects(&self, ray: &Ray3<S>) -> bool
[src]
Intersection test
impl<S: BaseFloat> Discrete<Aabb3<S>> for Aabb3<S>
[src]
fn intersects(&self, aabb: &Aabb3<S>) -> bool
[src]
Intersection test
impl<S: BaseFloat> PlaneBound<S> for Aabb3<S>
[src]
fn relate_plane(&self, plane: Plane<S>) -> Relation
[src]
Classify the spatial relation with a plane.
fn relate_clip_space(&self, projection: Matrix4<S>) -> Relation
[src]
Classify the relation with a projection matrix.
impl<S: BaseNum> SurfaceArea for Aabb3<S>
[src]
type Scalar = S
Result type returned from surface area computation
fn surface_area(&self) -> S
[src]
Compute surface area