Struct bevy_xpbd_3d::plugins::collision::ColliderAabb
source · pub struct ColliderAabb {
pub min: Vector,
pub max: Vector,
}
Expand description
The Axis-Aligned Bounding Box of a collider.
Fields§
§min: Vector
The minimum point of the AABB.
max: Vector
The maximum point of thr AABB.
Implementations§
source§impl ColliderAabb
impl ColliderAabb
sourcepub fn new(center: Vector, half_size: Vector) -> Self
pub fn new(center: Vector, half_size: Vector) -> Self
Creates a new ColliderAabb
from the given center
and half_size
.
sourcepub fn from_min_max(min: Vector, max: Vector) -> Self
pub fn from_min_max(min: Vector, max: Vector) -> Self
Creates a new ColliderAabb
from its minimum and maximum points.
sourcepub fn from_shape(shape: &SharedShape) -> Self
pub fn from_shape(shape: &SharedShape) -> Self
Creates a new ColliderAabb
from a given [SharedShape
].
sourcepub fn intersects(&self, other: &Self) -> bool
pub fn intersects(&self, other: &Self) -> bool
Checks if self
intersects with other
.
Trait Implementations§
source§impl Clone for ColliderAabb
impl Clone for ColliderAabb
source§fn clone(&self) -> ColliderAabb
fn clone(&self) -> ColliderAabb
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Component for ColliderAabb
impl Component for ColliderAabb
source§impl Debug for ColliderAabb
impl Debug for ColliderAabb
source§impl Default for ColliderAabb
impl Default for ColliderAabb
source§impl PartialEq for ColliderAabb
impl PartialEq for ColliderAabb
source§fn eq(&self, other: &ColliderAabb) -> bool
fn eq(&self, other: &ColliderAabb) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ColliderAabb
impl StructuralPartialEq for ColliderAabb
Auto Trait Implementations§
impl RefUnwindSafe for ColliderAabb
impl Send for ColliderAabb
impl Sync for ColliderAabb
impl Unpin for ColliderAabb
impl UnwindSafe for ColliderAabb
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId) )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
fn get_components(self, func: &mut impl FnMut(StorageType, OwningPtr<'_>))
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given [World
].§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.