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>
max: Point3<S>
Methods
impl<S: BaseNum> Aabb3<S>
[src]
fn new(p1: Point3<S>, p2: Point3<S>) -> Aabb3<S>
Construct a new axis-aligned bounding box from two points.
fn to_corners(&self) -> [Point3<S>; 8]
Compute corners.
Trait Implementations
impl<S: Copy> Copy for Aabb3<S>
[src]
impl<S: Clone> Clone for Aabb3<S>
[src]
fn clone(&self) -> Aabb3<S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<S: PartialEq> PartialEq for Aabb3<S>
[src]
fn eq(&self, __arg_0: &Aabb3<S>) -> bool
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
This method tests for !=
.
impl<S: BaseNum> Aabb<S, Vector3<S>, Point3<S>> for Aabb3<S>
[src]
fn new(p1: Point3<S>, p2: Point3<S>) -> Aabb3<S>
Create a new AABB using two points as opposing corners.
fn min(&self) -> Point3<S>
Return a shared reference to the point nearest to (-inf, -inf).
fn max(&self) -> Point3<S>
Return a shared reference to the point nearest to (inf, inf).
fn contains(&self, p: Point3<S>) -> bool
Tests whether a point is cointained in the box, inclusive for min corner and exclusive for the max corner. Read more
fn dim(&self) -> V
Return the dimensions of this AABB.
fn volume(&self) -> S
Return the volume this AABB encloses.
fn center(&self) -> P
Return the center point of this AABB.
fn grow(&self, p: P) -> Self where
P: MinMax,
P: MinMax,
Returns a new AABB that is grown to include the given point.
fn add_v(&self, v: V) -> Self
Add a vector to every point in the AABB, returning a new AABB.
fn mul_s(&self, s: S) -> Self
Multiply every point in the AABB by a scalar, returning a new AABB.
fn mul_v(&self, v: V) -> Self
Multiply every point in the AABB by a vector, returning a new AABB.
impl<S: BaseNum> Debug for Aabb3<S>
[src]
impl<S: BaseFloat + 'static> Bound<S> for Aabb3<S>
[src]
fn relate_plane(self, plane: Plane<S>) -> Relation
Classify the spatial relation with a plane.
fn relate_clip_space(self, projection: Matrix4<S>) -> Relation
Classify the relation with a projection matrix.