Struct heron::rapier_plugin::rapier::parry::bounding_volume::AABB [−][src]
An Axis Aligned Bounding Box.
Fields
mins: Point<f32, 3_usize>
maxs: Point<f32, 3_usize>
Implementations
impl AABB
[src]
pub const EDGES_VERTEX_IDS: [(usize, usize); 12]
[src]
The vertex indices of each edge of this AABB.
This gives, for each edge of this AABB, the indices of its
vertices when taken from the self.vertices()
array.
Here is how the faces are numbered, assuming
a right-handed coordinate system:
y 3 - 2 | 7 − 6 | ___ x | | 1 (the zero is bellow 3 and on the left of 1, hidden by the 4-5-6-7 face.) / 4 - 5 z
pub const FACES_VERTEX_IDS: [(usize, usize, usize, usize); 6]
[src]
The vertex indices of each face of this AABB.
This gives, for each face of this AABB, the indices of its
vertices when taken from the self.vertices()
array.
Here is how the faces are numbered, assuming
a right-handed coordinate system:
y 3 - 2 | 7 − 6 | ___ x | | 1 (the zero is bellow 3 and on the left of 1, hidden by the 4-5-6-7 face.) / 4 - 5 z
pub fn new(mins: Point<f32, 3_usize>, maxs: Point<f32, 3_usize>) -> AABB
[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() -> AABB
[src]
Creates an invalid AABB with mins
components set to Real::max_values
and maxs
components set to -Real::max_values
.
This is often used as the initial values of some AABB merging algorithms.
pub fn from_half_extents(
center: Point<f32, 3_usize>,
half_extents: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
) -> AABB
[src]
center: Point<f32, 3_usize>,
half_extents: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
) -> AABB
Creates a new AABB from its center and its half-extents.
pub fn from_points<'a, I>(pts: I) -> AABB where
I: IntoIterator<Item = &'a Point<f32, 3_usize>>,
[src]
I: IntoIterator<Item = &'a Point<f32, 3_usize>>,
Creates a new AABB from a set of points.
pub fn center(&self) -> Point<f32, 3_usize>
[src]
The center of this AABB.
pub fn half_extents(
&self
) -> Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
[src]
&self
) -> Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
The half extents of this AABB.
pub fn extents(
&self
) -> Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
[src]
&self
) -> Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
The extents of this AABB.
pub fn take_point(&mut self, pt: Point<f32, 3_usize>)
[src]
Enlarges this AABB so it also contains the point pt
.
pub fn transform_by(
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>
) -> AABB
[src]
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>
) -> AABB
Computes the AABB bounding self
transformed by m
.
pub fn bounding_sphere(&self) -> BoundingSphere
[src]
The smallest bounding sphere containing this AABB.
pub fn contains_local_point(&self, point: &Point<f32, 3_usize>) -> bool
[src]
pub fn vertices(&self) -> [Point<f32, 3_usize>; 8]
[src]
Computes the vertices of this AABB.
pub fn split_at_center(&self) -> [AABB; 8]
[src]
Splits this AABB at its center, into height parts (as in an octree).
impl AABB
[src]
pub fn clip_segment(
&self,
pa: &Point<f32, 3_usize>,
pb: &Point<f32, 3_usize>
) -> Option<Segment>
[src]
&self,
pa: &Point<f32, 3_usize>,
pb: &Point<f32, 3_usize>
) -> Option<Segment>
Computes the intersection of a segment with this AABB.
Returns None
if there is no intersection.
pub fn clip_line_parameters(
&self,
orig: &Point<f32, 3_usize>,
dir: &Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
) -> Option<(f32, f32)>
[src]
&self,
orig: &Point<f32, 3_usize>,
dir: &Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
) -> Option<(f32, f32)>
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<f32, 3_usize>,
dir: &Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
) -> Option<Segment>
[src]
&self,
orig: &Point<f32, 3_usize>,
dir: &Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
) -> Option<Segment>
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) -> Option<(f32, f32)>
[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) -> Option<Segment>
[src]
Computes the intersection segment between a ray and this AABB.
Returns None
if there is no intersection.
impl AABB
[src]
pub fn clip_polygon(&self, points: &mut Vec<Point<f32, 3_usize>, Global>)
[src]
Computes the intersections between this AABB and the given polygon.
The results is written into points
directly. The input points are
assumed to form a convex polygon where all points lie on the same plane.
In order to avoid internal allocations, uses self.clip_polygon_with_workspace
instead.
pub fn clip_polygon_with_workspace(
&self,
points: &mut Vec<Point<f32, 3_usize>, Global>,
workspace: &mut Vec<Point<f32, 3_usize>, Global>
)
[src]
&self,
points: &mut Vec<Point<f32, 3_usize>, Global>,
workspace: &mut Vec<Point<f32, 3_usize>, Global>
)
Computes the intersections between this AABB and the given polygon.
The results is written into points
directly. The input points are
assumed to form a convex polygon where all points lie on the same plane.
impl AABB
[src]
pub fn to_trimesh(
&self
) -> (Vec<Point<f32, 3_usize>, Global>, Vec<[u32; 3], Global>)
[src]
&self
) -> (Vec<Point<f32, 3_usize>, Global>, Vec<[u32; 3], Global>)
Discretize the boundary of this AABB as a triangle-mesh.
Trait Implementations
impl BoundingVolume for AABB
[src]
pub fn center(&self) -> Point<f32, 3_usize>
[src]
pub fn intersects(&self, other: &AABB) -> bool
[src]
pub fn contains(&self, other: &AABB) -> bool
[src]
pub fn merge(&mut self, other: &AABB)
[src]
pub fn merged(&self, other: &AABB) -> AABB
[src]
pub fn loosen(&mut self, amount: f32)
[src]
pub fn loosened(&self, amount: f32) -> AABB
[src]
pub fn tighten(&mut self, amount: f32)
[src]
pub fn tightened(&self, amount: f32) -> AABB
[src]
impl Clone for AABB
[src]
impl Copy for AABB
[src]
impl Debug for AABB
[src]
impl PartialEq<AABB> for AABB
[src]
impl PointQuery for AABB
[src]
pub fn project_local_point(
&self,
pt: &Point<f32, 3_usize>,
solid: bool
) -> PointProjection
[src]
&self,
pt: &Point<f32, 3_usize>,
solid: bool
) -> PointProjection
pub fn project_local_point_and_get_feature(
&self,
pt: &Point<f32, 3_usize>
) -> (PointProjection, FeatureId)
[src]
&self,
pt: &Point<f32, 3_usize>
) -> (PointProjection, FeatureId)
pub fn distance_to_local_point(
&self,
pt: &Point<f32, 3_usize>,
solid: bool
) -> f32
[src]
&self,
pt: &Point<f32, 3_usize>,
solid: bool
) -> f32
pub fn contains_local_point(&self, pt: &Point<f32, 3_usize>) -> bool
[src]
pub fn project_point(
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
pt: &Point<f32, 3_usize>,
solid: bool
) -> PointProjection
[src]
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
pt: &Point<f32, 3_usize>,
solid: bool
) -> PointProjection
pub fn distance_to_point(
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
pt: &Point<f32, 3_usize>,
solid: bool
) -> f32
[src]
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
pt: &Point<f32, 3_usize>,
solid: bool
) -> f32
pub fn project_point_and_get_feature(
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
pt: &Point<f32, 3_usize>
) -> (PointProjection, FeatureId)
[src]
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
pt: &Point<f32, 3_usize>
) -> (PointProjection, FeatureId)
pub fn contains_point(
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
pt: &Point<f32, 3_usize>
) -> bool
[src]
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
pt: &Point<f32, 3_usize>
) -> bool
impl RayCast for AABB
[src]
pub fn cast_local_ray(
&self,
ray: &Ray,
max_toi: f32,
solid: bool
) -> Option<f32>
[src]
&self,
ray: &Ray,
max_toi: f32,
solid: bool
) -> Option<f32>
pub fn cast_local_ray_and_get_normal(
&self,
ray: &Ray,
max_toi: f32,
solid: bool
) -> Option<RayIntersection>
[src]
&self,
ray: &Ray,
max_toi: f32,
solid: bool
) -> Option<RayIntersection>
pub fn intersects_local_ray(&self, ray: &Ray, max_toi: f32) -> bool
[src]
pub fn cast_ray(
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
ray: &Ray,
max_toi: f32,
solid: bool
) -> Option<f32>
[src]
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
ray: &Ray,
max_toi: f32,
solid: bool
) -> Option<f32>
pub fn cast_ray_and_get_normal(
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
ray: &Ray,
max_toi: f32,
solid: bool
) -> Option<RayIntersection>
[src]
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
ray: &Ray,
max_toi: f32,
solid: bool
) -> Option<RayIntersection>
pub fn intersects_ray(
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
ray: &Ray,
max_toi: f32
) -> bool
[src]
&self,
m: &Isometry<f32, Unit<Quaternion<f32>>, 3_usize>,
ray: &Ray,
max_toi: f32
) -> bool
impl StructuralPartialEq for AABB
[src]
Auto Trait Implementations
impl RefUnwindSafe for AABB
impl Send for AABB
impl Sync for AABB
impl Unpin for AABB
impl UnwindSafe for AABB
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Any + Clone,
T: Any + Clone,
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> Downcast<T> for T
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Debug + Any,
[src]
T: Copy + PartialEq<T> + Debug + Any,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
T: 'static + Send + Sync + Clone,
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
impl<T> Upcast<T> for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,