Struct ncollide3d::bounding_volume::AABB [−][src]
An Axis Aligned Bounding Box.
Fields
mins: Point<N>
maxs: Point<N>
Implementations
impl<N: RealField> AABB<N>
[src]
impl<N: RealField> AABB<N>
[src]pub fn new(mins: Point<N>, maxs: Point<N>) -> AABB<N>
[src]
Creates a new AABB.
Arguments:
mins
- position of the point with the smallest coordinates.maxs
- position of the point with the highest coordinates. Each component ofmins
must be smaller than the related components ofmaxs
.
pub fn new_invalid() -> Self
[src]
Creates an invalid AABB with mins
components set to N::max_values
and maxs
components set to -N::max_values
.
This is often used as the initial values of some AABB merging algorithms.
pub fn from_half_extents(center: Point<N>, half_extents: Vector<N>) -> Self
[src]
Creates a new AABB from its center and its half-extents.
pub fn from_points<'a, I>(pts: I) -> Self where
I: IntoIterator<Item = &'a Point<N>>,
[src]
I: IntoIterator<Item = &'a Point<N>>,
Creates a new AABB from a set of points.
pub fn mins(&self) -> &Point<N>
[src]
use the .mins
public field instead.
Reference to the AABB point with the smallest components along each axis.
pub fn maxs(&self) -> &Point<N>
[src]
use the .maxs
public field instead.
Reference to the AABB point with the biggest components along each axis.
pub fn center(&self) -> Point<N>
[src]
The center of this AABB.
pub fn half_extents(&self) -> Vector<N>
[src]
The half extents of this AABB.
pub fn extents(&self) -> Vector<N>
[src]
The extents of this AABB.
pub fn take_point(&mut self, pt: Point<N>)
[src]
Enlarges this AABB so it also contains the point pt
.
pub fn transform_by(&self, m: &Isometry<N>) -> Self
[src]
Computes the AABB bounding self
transformed by m
.
pub fn bounding_sphere(&self) -> BoundingSphere<N>
[src]
The smallest bounding sphere containing this AABB.
pub fn contains_local_point(&self, point: &Point<N>) -> bool
[src]
impl<N: RealField> AABB<N>
[src]
impl<N: RealField> AABB<N>
[src]pub fn clip_line_parameters(
&self,
orig: &Point<N>,
dir: &Vector<N>
) -> Option<(N, N)>
[src]
&self,
orig: &Point<N>,
dir: &Vector<N>
) -> Option<(N, N)>
Computes the parameters of the two intersection points between a line and this AABB.
The parameters are such that the point are given by orig + dir * parameter
.
Returns None
if there is no intersection.
pub fn clip_line(&self, orig: &Point<N>, dir: &Vector<N>) -> Option<Segment<N>>
[src]
Computes the intersection segment between a line and this AABB.
Returns None
if there is no intersection.
pub fn clip_ray_parameters(&self, ray: &Ray<N>) -> Option<(N, N)>
[src]
Computes the parameters of the two intersection points between a ray and this AABB.
The parameters are such that the point are given by ray.orig + ray.dir * parameter
.
Returns None
if there is no intersection.
pub fn clip_ray(&self, ray: &Ray<N>) -> Option<Segment<N>>
[src]
Computes the intersection segment between a ray and this AABB.
Returns None
if there is no intersection.
Trait Implementations
impl<'a, N: RealField, S: CompositeShape<N> + PointQuery<N>> BestFirstVisitor<N, usize, AABB<N>> for CompositeClosestPointVisitor<'a, N, S>
[src]
impl<'a, N: RealField, S: CompositeShape<N> + PointQuery<N>> BestFirstVisitor<N, usize, AABB<N>> for CompositeClosestPointVisitor<'a, N, S>
[src]type Result = PointProjection<N>
The result of a best-first traversal.
fn visit(
&mut self,
best: N,
aabb: &AABB<N>,
data: Option<&usize>
) -> BestFirstVisitStatus<N, Self::Result>
[src]
&mut self,
best: N,
aabb: &AABB<N>,
data: Option<&usize>
) -> BestFirstVisitStatus<N, Self::Result>
impl<N: RealField> BoundingVolume<N> for AABB<N>
[src]
impl<N: RealField> BoundingVolume<N> for AABB<N>
[src]fn center(&self) -> Point<N>
[src]
fn intersects(&self, other: &AABB<N>) -> bool
[src]
fn contains(&self, other: &AABB<N>) -> bool
[src]
fn merge(&mut self, other: &AABB<N>)
[src]
fn merged(&self, other: &AABB<N>) -> AABB<N>
[src]
fn loosen(&mut self, amount: N)
[src]
fn loosened(&self, amount: N) -> AABB<N>
[src]
fn tighten(&mut self, amount: N)
[src]
fn tightened(&self, amount: N) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Ball<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Ball<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Compound<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Compound<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Capsule<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Capsule<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Segment<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Segment<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Triangle<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Triangle<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for TriMesh<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for TriMesh<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for ConvexHull<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for ConvexHull<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Cuboid<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Cuboid<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for HeightField<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for HeightField<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Plane<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Plane<N>
[src]fn bounding_volume(&self, _: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Polyline<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Polyline<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for dyn Shape<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for dyn Shape<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Cone<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Cone<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Cylinder<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Cylinder<N>
[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> PointQuery<N> for AABB<N>
[src]
impl<N: RealField> PointQuery<N> for AABB<N>
[src]fn project_point(
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> PointProjection<N>
[src]
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> PointProjection<N>
fn project_point_with_feature(
&self,
m: &Isometry<N>,
pt: &Point<N>
) -> (PointProjection<N>, FeatureId)
[src]
&self,
m: &Isometry<N>,
pt: &Point<N>
) -> (PointProjection<N>, FeatureId)
fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N
[src]
fn contains_point(&self, m: &Isometry<N>, pt: &Point<N>) -> bool
[src]
impl<N: RealField> RayCast<N> for AABB<N>
[src]
impl<N: RealField> RayCast<N> for AABB<N>
[src]fn toi_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
[src]
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
fn toi_and_normal_and_uv_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>, max_toi: N) -> bool
[src]
impl<'a, N: RealField, T: Clone> SimultaneousVisitor<T, AABB<N>> for AABBSetsInterferencesCollector<'a, N, T>
[src]
impl<'a, N: RealField, T: Clone> SimultaneousVisitor<T, AABB<N>> for AABBSetsInterferencesCollector<'a, N, T>
[src]impl<N: Copy + RealField> Copy for AABB<N>
[src]
impl<N: RealField> StructuralPartialEq for AABB<N>
[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for AABB<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for AABB<N>
impl<N> Sync for AABB<N>
impl<N> Unpin for AABB<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for AABB<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> Slottable for T where
T: Copy,
[src]
T: Copy,