Struct physx::rigid_body::RigidBodyMap
source · [−]#[repr(transparent)]pub struct RigidBodyMap<L, D>where
L: ArticulationLink,
D: RigidDynamic,{ /* private fields */ }
Expand description
A wrapper for RigidBody, parametrized by the ArticulationLink and
RigidDynamic that may be it’s most derived type. Use cast_map
or as_*
to cast to it’s most derived type if specialized functionality is needed.
Implementations
sourceimpl<L, D> RigidBodyMap<L, D>where
L: ArticulationLink,
D: RigidDynamic,
impl<L, D> RigidBodyMap<L, D>where
L: ArticulationLink,
D: RigidDynamic,
sourcepub fn cast_map<'a, Ret, RDFn, ALFn>(
&'a mut self,
rigid_dynamic_fn: RDFn,
articulation_link_fn: ALFn
) -> Retwhere
RDFn: FnMut(&'a mut D) -> Ret,
ALFn: FnMut(&'a mut L) -> Ret,
pub fn cast_map<'a, Ret, RDFn, ALFn>(
&'a mut self,
rigid_dynamic_fn: RDFn,
articulation_link_fn: ALFn
) -> Retwhere
RDFn: FnMut(&'a mut D) -> Ret,
ALFn: FnMut(&'a mut L) -> Ret,
Cast to the most-derived type as determined by get_type
, which returns the ActorType.
Because this does not use get_concrete_type
, this method does not have the safety
concerns of the other cast_map
s, and a try_cast_map
method is unneded.
sourcepub fn as_rigid_dynamic(&mut self) -> Option<&mut D>
pub fn as_rigid_dynamic(&mut self) -> Option<&mut D>
Tries to cast to RigidDynamic.
sourcepub fn as_articulation_link(&mut self) -> Option<&mut L>
pub fn as_articulation_link(&mut self) -> Option<&mut L>
Tries to cast to ArticulationLink.
Trait Implementations
sourceimpl<P, L, D> Class<P> for RigidBodyMap<L, D>where
PxRigidBody: Class<P>,
L: ArticulationLink,
D: RigidDynamic,
impl<P, L, D> Class<P> for RigidBodyMap<L, D>where
PxRigidBody: Class<P>,
L: ArticulationLink,
D: RigidDynamic,
sourcefn as_ptr(&self) -> *const P
fn as_ptr(&self) -> *const P
Returns a raw const pointer to the wrapped type.
Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe.
In particular: this pointer should not be used to construct a second owning wrapper around the pointer. Read more
sourcefn as_mut_ptr(&mut self) -> *mut P
fn as_mut_ptr(&mut self) -> *mut P
Returns a raw mut pointer to the wrapped type.
Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe.
In particular: this pointer should not be used to construct a second owning wrapper around the pointer. Read more
Auto Trait Implementations
impl<L, D> RefUnwindSafe for RigidBodyMap<L, D>where
D: RefUnwindSafe,
L: RefUnwindSafe,
impl<L, D> !Send for RigidBodyMap<L, D>
impl<L, D> !Sync for RigidBodyMap<L, D>
impl<L, D> Unpin for RigidBodyMap<L, D>where
D: Unpin,
L: Unpin,
impl<L, D> UnwindSafe for RigidBodyMap<L, D>where
D: UnwindSafe,
L: UnwindSafe,
Blanket Implementations
sourceimpl<T> Actor for Twhere
T: Class<PxActor> + Base,
impl<T> Actor for Twhere
T: Class<PxActor> + Base,
sourcefn get_world_bounds(&self, inflation: f32) -> PxBounds3
fn get_world_bounds(&self, inflation: f32) -> PxBounds3
Get the world bounds of this actor
sourcefn set_actor_flag(&mut self, flag: ActorFlag, value: bool)
fn set_actor_flag(&mut self, flag: ActorFlag, value: bool)
Set a flag on this actor
sourcefn set_actor_flags(&mut self, flags: BitFlags<ActorFlag>)
fn set_actor_flags(&mut self, flags: BitFlags<ActorFlag>)
Set the flags to the provided value
sourcefn get_actor_flags(&self) -> BitFlags<ActorFlag>
fn get_actor_flags(&self) -> BitFlags<ActorFlag>
Get all actor flags
sourcefn set_dominance_group(&mut self, group: u8)
fn set_dominance_group(&mut self, group: u8)
Set the dominance group
sourcefn get_dominance_group(&self) -> u8
fn get_dominance_group(&self) -> u8
Read the dominance group
sourcefn set_owner_client(&mut self, client: u8)
fn set_owner_client(&mut self, client: u8)
Set the owner client of this actor
sourcefn get_owner_client(&self) -> u8
fn get_owner_client(&self) -> u8
Read the owner client of this actor
sourcefn enable_visualization(&mut self, enable: bool)
fn enable_visualization(&mut self, enable: bool)
Enable visualization of this actor
sourcefn enable_gravity(&mut self, enable: bool)
fn enable_gravity(&mut self, enable: bool)
set gravity state
sourceimpl<T> Base for Twhere
T: Class<PxBase>,
impl<T> Base for Twhere
T: Class<PxBase>,
sourcefn get_concrete_type_name(&self) -> Option<&str>
fn get_concrete_type_name(&self) -> Option<&str>
Get the name of the real type referenced by this pointer, or None if the returned string is not valid
sourcefn get_concrete_type(&self) -> ConcreteType
fn get_concrete_type(&self) -> ConcreteType
Returns an enumerated value identifying the type. This may return ConcreteType::Undefined
in surprising situations, notably this does not seem to work with
get_active_actors
. Use
get_type
for actors if possible. Read moresourcefn set_base_flag(&mut self, flag: BaseFlag, value: bool)
fn set_base_flag(&mut self, flag: BaseFlag, value: bool)
Set or unset the specified flag on this object.
sourcefn set_base_flags(&mut self, in_flags: BitFlags<BaseFlag>)
fn set_base_flags(&mut self, in_flags: BitFlags<BaseFlag>)
Set the BaseFlags of this object. Note that replaces all flags currently
on the object. Use
set_base_flag
to set individual flags. Read moresourcefn get_base_flags(&self) -> BitFlags<BaseFlag>
fn get_base_flags(&self) -> BitFlags<BaseFlag>
Read the BaseFlags of this object
sourcefn is_releasable(&self) -> bool
fn is_releasable(&self) -> bool
Returns true if this object can be released, i.e., it is not subordinate.
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more