[][src]Struct nphysics3d::object::Collider

#[repr(transparent)]
pub struct Collider<N: RealField>(pub CollisionObject<N, ColliderData<N>>);

A geometric entity that can be attached to a body so it can be affected by contacts and proximity queries.

Methods

impl<N: RealField> Collider<N>[src]

pub fn user_data(&self) -> Option<&(dyn Any + Send + Sync)>[src]

The user-data attached to this collider.

pub fn user_data_mut(&mut self) -> Option<&mut (dyn Any + Send + Sync)>[src]

Mutable reference to the user-data attached to this collider.

pub fn set_user_data(
    &mut self,
    data: Option<Box<dyn Any + Send + Sync>>
) -> Option<Box<dyn Any + Send + Sync>>
[src]

Sets the user-data attached to this collider.

pub fn take_user_data(&mut self) -> Option<Box<dyn Any + Send + Sync>>[src]

Replace the user-data of this collider by None and returns the old value.

pub fn margin(&self) -> N[src]

The collision margin surrounding this collider.

pub fn body(&self) -> BodyHandle[src]

Handle to the body this collider is attached to.

pub fn anchor(&self) -> &ColliderAnchor<N>[src]

The anchor attaching this collider with a body part or deformable body.

pub fn position_wrt_body(&self) -> Isometry<N>[src]

The position of this collider geometry wrt. the body it is attached to.

pub fn body_part(&self, subshape_id: usize) -> BodyPartHandle[src]

Handle to the body part containing the given subshape of this collider's shape.

pub fn material(&self) -> &dyn Material<N>[src]

The material of this collider.

pub fn is_sensor(&self) -> bool[src]

Returns true if this collider is a sensor.

pub fn handle(&self) -> ColliderHandle[src]

The collision object unique handle.

pub fn position(&self) -> &Isometry<N>[src]

The collision object position.

pub fn set_position(&mut self, pos: Isometry<N>)[src]

Sets the position of the collision object.

pub fn set_deformations(&mut self, coords: &[N])[src]

Deforms the underlying shape if possible.

Panics if the shape is not deformable.

pub fn shape(&self) -> &ShapeHandle<N>[src]

The collision object shape.

pub fn collision_groups(&self) -> &CollisionGroups[src]

The collision groups of the collision object.

pub fn query_type(&self) -> GeometricQueryType<N>[src]

The kind of queries this collision object may generate.

pub fn name(&self) -> &str[src]

The user-defined name of this collider.

pub fn set_name(&mut self, name: String)[src]

Sets the name of this collider.

Auto Trait Implementations

impl<N> Send for Collider<N> where
    N: Scalar

impl<N> Sync for Collider<N> where
    N: Scalar

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Downcast for T where
    T: Any
[src]

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self