[][src]Struct physx::articulation_base::ArticulationMap

#[repr(transparent)]pub struct ArticulationMap<T, C> where
    T: Articulation,
    C: ArticulationReducedCoordinate
{ /* fields omitted */ }

A wrapper for ArticulationBase, parametrized by the Articulation and ArticulationReducedCoordinate that may be it's most derived type. Use try_cast_map or as_* to cast to it's most derived type if specialized functionality is needed.

Implementations

impl<T, C> ArticulationMap<T, C> where
    T: Articulation,
    C: ArticulationReducedCoordinate
[src]

pub unsafe fn cast_map<'a, Ret, ArtFn, ArcFn>(
    &'a mut self,
    art_fn: ArtFn,
    arc_fn: ArcFn
) -> Ret where
    ArtFn: FnMut(&'a mut T) -> Ret,
    ArcFn: FnMut(&'a mut C) -> Ret, 
[src]

Safety

this relies on get_concrete_type to determine the articulation type, which has had issues with returning ConcreteType::Undefined for Actor subclasses. try_cast_map will return None when this would crash.

pub fn try_cast_map<'a, Ret, ArtFn, ArcFn>(
    &'a mut self,
    art_fn: ArtFn,
    arc_fn: ArcFn
) -> Option<Ret> where
    ArtFn: FnMut(&'a mut T) -> Ret,
    ArcFn: FnMut(&'a mut C) -> Ret, 
[src]

Calls one of the given functions and returns the result if the articulation can be safely cast to that type. If get_concrete_type does not return ConcreteType::Articulation or ConcreteType::ArticulationReducedCoordinate this call returns None.

pub fn as_articulation(&mut self) -> Option<&mut T>[src]

Tries to cast to PxArticulation, returns None if get_concrete_type does not return ConcreteType::Articulation.

pub fn as_articulation_reduced_coordinate(&mut self) -> Option<&mut T>[src]

Tries to cast to PxArticulationReducedCoordinate, returns None if get_concrete_type does not return ConcreteType::ArticulationReducedCoordinate.

Trait Implementations

impl<T, C> ArticulationBase for ArticulationMap<T, C> where
    T: Articulation,
    C: ArticulationReducedCoordinate
[src]

impl<S, T, C> Class<S> for ArticulationMap<T, C> where
    PxArticulationBase: Class<S>,
    T: Articulation,
    C: ArticulationReducedCoordinate
[src]

Auto Trait Implementations

impl<T, C> RefUnwindSafe for ArticulationMap<T, C> where
    C: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<T, C> !Send for ArticulationMap<T, C>[src]

impl<T, C> !Sync for ArticulationMap<T, C>[src]

impl<T, C> Unpin for ArticulationMap<T, C>[src]

impl<T, C> UnwindSafe for ArticulationMap<T, C> where
    C: RefUnwindSafe,
    T: RefUnwindSafe
[src]

Blanket Implementations

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

impl<T> Base for T where
    T: Class<PxBase>, 
[src]

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

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

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.