[−][src]Struct physx::articulation_base::ArticulationMap
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]
T: Articulation,
C: ArticulationReducedCoordinate,
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]
&'a mut self,
art_fn: ArtFn,
arc_fn: ArcFn
) -> Ret where
ArtFn: FnMut(&'a mut T) -> Ret,
ArcFn: FnMut(&'a mut C) -> Ret,
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]
&'a mut self,
art_fn: ArtFn,
arc_fn: ArcFn
) -> Option<Ret> where
ArtFn: FnMut(&'a mut T) -> Ret,
ArcFn: FnMut(&'a mut C) -> Ret,
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]
T: Articulation,
C: ArticulationReducedCoordinate,
type ArticulationLink = T::ArticulationLink
pub fn set_solver_iteration_counts(
&mut self,
min_position_iters: u32,
min_velocity_iters: u32
)
[src]
&mut self,
min_position_iters: u32,
min_velocity_iters: u32
)
pub fn get_solver_iteration_counts(&self) -> (u32, u32)
[src]
pub fn is_sleeping(&self) -> bool
[src]
pub fn set_sleep_threshold(&mut self, threshold: f32)
[src]
pub fn get_sleep_threshold(&self) -> f32
[src]
pub fn set_stabilization_threshold(&mut self, threshold: f32)
[src]
pub fn get_stabilization_threshold(&self) -> f32
[src]
pub fn set_wake_counter(&mut self, threshold: f32)
[src]
pub fn get_wake_counter(&self) -> f32
[src]
pub fn wake_up(&mut self)
[src]
pub fn put_to_sleep(&mut self)
[src]
pub fn get_nb_links(&self) -> usize
[src]
pub fn root_link(&self) -> Option<&Self::ArticulationLink>
[src]
pub fn root_link_mut(&mut self) -> Option<&mut Self::ArticulationLink>
[src]
pub fn get_links(&self) -> Vec<&Self::ArticulationLink>
[src]
pub fn get_links_mut(&mut self) -> Vec<&mut Self::ArticulationLink>
[src]
pub fn get_world_bounds(&self, inflation: f32) -> PxBounds3
[src]
pub fn create_link(
&mut self,
parent: Option<&mut Self::ArticulationLink>,
pose: &PxTransform,
user_data: <Self::ArticulationLink as UserData>::UserData
) -> Option<&mut Self::ArticulationLink>
[src]
&mut self,
parent: Option<&mut Self::ArticulationLink>,
pose: &PxTransform,
user_data: <Self::ArticulationLink as UserData>::UserData
) -> Option<&mut Self::ArticulationLink>
pub fn create_articulation_joint<J: ArticulationJointBase>(
&mut self,
parent: &mut Self::ArticulationLink,
parent_frame: &PxTransform,
child: &mut Self::ArticulationLink,
child_frame: &PxTransform
) -> Option<&mut J>
[src]
&mut self,
parent: &mut Self::ArticulationLink,
parent_frame: &PxTransform,
child: &mut Self::ArticulationLink,
child_frame: &PxTransform
) -> Option<&mut J>
pub unsafe fn release_articulation_joint(
&mut self,
joint: &mut impl ArticulationJointBase
)
[src]
&mut self,
joint: &mut impl ArticulationJointBase
)
impl<S, T, C> Class<S> for ArticulationMap<T, C> where
PxArticulationBase: Class<S>,
T: Articulation,
C: ArticulationReducedCoordinate,
[src]
PxArticulationBase: Class<S>,
T: Articulation,
C: ArticulationReducedCoordinate,
Auto Trait Implementations
impl<T, C> RefUnwindSafe for ArticulationMap<T, C> where
C: RefUnwindSafe,
T: RefUnwindSafe,
[src]
C: RefUnwindSafe,
T: RefUnwindSafe,
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]
C: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Base for T where
T: Class<PxBase>,
[src]
T: Class<PxBase>,
pub fn get_concrete_type_name(&self) -> Option<&str>
[src]
pub fn get_concrete_type(&self) -> ConcreteType
[src]
pub fn set_base_flag(&mut self, flag: BaseFlag, value: bool)
[src]
pub fn set_base_flags(&mut self, in_flags: BitFlags<BaseFlag>)
[src]
pub fn get_base_flags(&self) -> BitFlags<BaseFlag>
[src]
pub fn is_releasable(&self) -> bool
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,