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

#[repr(transparent)]
pub struct Collider<N: RealField, Handle: BodyHandle>(_);

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

Methods

impl<N: RealField, Handle: BodyHandle> Collider<N, Handle>[src]

pub fn removal_data(&self) -> Option<ColliderRemovalData<N, Handle>>[src]

Computes the data that needs to be returned once this collider has been removed from a collider set.

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 set_margin(&mut self, margin: N)[src]

Sets the marging on this collider's shapes.

pub fn clear_update_flags(&mut self)[src]

Clear all the internal flags tracking changes made to this collider.

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

The density of this collider.

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

Handle to the body this collider is attached to.

pub fn anchor(&self) -> &ColliderAnchor<N, Handle>[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<Handle>[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 is_ccd_enabled(&self) -> bool[src]

Returns true if this collider is subjected to Continuous Collision Detection (CCD).

pub fn enable_ccd(&mut self, enabled: bool)[src]

Enable or disable Continuous Collision Detection (CCD) for this collider.

pub fn graph_index(&self) -> Option<CollisionObjectGraphIndex>[src]

The collider non-stable graph index.

This index may change whenever a collider is removed from the world.

pub fn set_graph_index(&mut self, index: Option<CollisionObjectGraphIndex>)[src]

Sets the collider unique but non-stable graph index.

pub fn proxy_handle(&self) -> Option<BroadPhaseProxyHandle>[src]

The collider's broad phase proxy unique identifier.

pub fn set_proxy_handle(&mut self, handle: Option<BroadPhaseProxyHandle>)[src]

Sets the collider's broad phase proxy unique identifier.

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

The collider position.

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

Sets the position of the collider.

pub fn set_position_with_prediction(
    &mut self,
    position: Isometry<N>,
    prediction: Isometry<N>
)
[src]

Sets the position of the collider.

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) -> &dyn Shape<N>[src]

The collider shape.

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

The collider shape.

pub fn set_shape(&mut self, shape: ShapeHandle<N>)[src]

Set the collider shape.

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

The collision groups of the collider.

pub fn set_collision_groups(&mut self, groups: CollisionGroups)[src]

Sets the collision groups of this collider.

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

The kind of queries this collider is expected to .

pub fn set_query_type(&mut self, query_type: GeometricQueryType<N>)[src]

Sets the GeometricQueryType of the collider. Use CollisionWorld::set_query_type to use this method.

Trait Implementations

impl<N: RealField, Handle: BodyHandle> CollisionObjectRef<N> for Collider<N, Handle>[src]

fn compute_aabb(&self) -> AABB<N>[src]

Computes the AABB of this collision object, ignoring self.predicted_position().

fn compute_swept_aabb(&self) -> AABB<N>[src]

Computes the swept AABB of this collision object, taking self.predict_position() into account. Read more

Auto Trait Implementations

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

impl<N, Handle> Unpin for Collider<N, Handle> where
    Handle: Unpin,
    N: Scalar + Unpin

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

impl<N, Handle> !RefUnwindSafe for Collider<N, Handle>

impl<N, Handle> !UnwindSafe for Collider<N, Handle>

Blanket Implementations

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Downcast for T where
    T: Any

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>,