[][src]Enum oxygengine_physics_2d::prelude::object::ColliderAnchor

pub enum ColliderAnchor<N, Handle> where
    Handle: BodyHandle,
    N: RealField
{ OnBodyPart { body_part: BodyPartHandle<Handle>, position_wrt_body_part: Isometry<N, U2, Unit<Complex<N>>>, }, OnDeformableBody { body: Handle, body_parts: Option<Arc<Vec<usize>>>, }, }

Description of the way a collider is attached to a body.

Variants

OnBodyPart

Attach of a collider with a body part.

Fields of OnBodyPart

body_part: BodyPartHandle<Handle>

The attached body part handle.

position_wrt_body_part: Isometry<N, U2, Unit<Complex<N>>>

Relative position of the collider wrt. the body part.

OnDeformableBody

Attach of a collider with a deformable body.

Fields of OnDeformableBody

body: Handle

The attached body handle.

body_parts: Option<Arc<Vec<usize>>>

A map between the colliders parts and body part indices.

The i-th part of the collider corresponds to the body_parts[i]-th body part. If set to None, the mapping is trivial, i.e., i-th part of the collider corresponds to the i-th body part.

Implementations

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

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

The body this anchor is attached to.

Trait Implementations

impl<N, Handle> Clone for ColliderAnchor<N, Handle> where
    Handle: BodyHandle + Clone,
    N: Clone + RealField
[src]

Auto Trait Implementations

impl<N, Handle> RefUnwindSafe for ColliderAnchor<N, Handle> where
    Handle: RefUnwindSafe,
    N: RefUnwindSafe + Scalar

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

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

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

impl<N, Handle> UnwindSafe for ColliderAnchor<N, Handle> where
    Handle: UnwindSafe,
    N: Scalar + UnwindSafe

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> Event for T where
    T: Send + Sync + 'static, 

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

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

impl<T> Resource 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>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> UserData for T where
    T: Clone + Send + Sync + Any
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,