Struct oxygengine_physics_2d::prelude::Collider [−][src]
#[repr(transparent)]pub struct Collider<N, Handle>(_)
where
N: RealField + Copy,
Handle: BodyHandle;
Expand description
A geometric entity that can be attached to a body so it can be affected by contacts and proximity queries.
Implementations
Computes the data that needs to be returned once this collider has been removed from a collider set.
The user-data attached to this collider.
Mutable reference to the user-data attached to this collider.
Sets the user-data attached to this collider.
Replaces the user-data of this collider by None
and returns the old value.
Sets the marging on this collider’s shapes.
Clears all the internal flags tracking changes made to this collider.
The anchor attaching this collider with a body part or deformable body.
The position of this collider geometry wrt. the body it is attached to.
Handle to the body part containing the given subshape of this collider’s shape.
A mutable reference to this collider’s material.
If the material is shared, then an internal clone is performed
before returning the mutable reference (this effectively calls
the Arc::make_mut
method to get a copy-on-write behavior).
Returns true
if this collider is subjected to Continuous Collision Detection (CCD).
Enables or disables Continuous Collision Detection (CCD) for this collider.
This collider’s non-stable graph index.
This index may change whenever a collider is removed from the world.
Sets the collider unique but non-stable graph index.
The collider’s broad phase proxy unique identifier.
Sets the collider’s broad phase proxy unique identifier.
Sets the position of the collider.
Sets the position of the collider.
Deforms the underlying shape if possible.
Panics if the shape is not deformable.
This collider’s shape.
Sets this collider’s shape.
The collision groups of the collider.
Sets the collision groups of this collider.
Returns the kind of queries this collider is expected to emit.
Sets the GeometricQueryType
of the collider.
Use CollisionWorld::set_query_type
to use this method.
Trait Implementations
impl<N, Handle> CollisionObjectRef<N> for Collider<N, Handle> where
N: RealField + Copy,
Handle: BodyHandle,
impl<N, Handle> CollisionObjectRef<N> for Collider<N, Handle> where
N: RealField + Copy,
Handle: BodyHandle,
The interaction graph index of this collision object, if it has been registered into an interaction graph. Read more
The broad-phase proxy handle of this collision object, if it has been registered into a broad-phase. Read more
The position of this collision object.
The expected position of this collision object in the next updates. Read more
The collision groups of this collision object.
The type of geometric queries this collision object is subjected to.
Flags indicating what changed in this collision object.
Computes the AABB of this collision object, ignoring self.predicted_position()
.
Computes the swept AABB of this collision object, taking self.predict_position()
into account. Read more
Auto Trait Implementations
impl<N, Handle> !RefUnwindSafe for Collider<N, Handle>
impl<N, Handle> !UnwindSafe for Collider<N, Handle>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: 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
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub 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. Read more
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.