pub struct ActorMap<L, S, D>where
L: ArticulationLink,
S: RigidStatic,
D: RigidDynamic,{ /* private fields */ }
Expand description
A wrapper for PxActor or PxRigidActor objects that implements RigidActor
.
It is parametrized by the ArticulationLink, RigidStatic, and RigidDynamic types,
use as_articulation_link
and co. or cast_map
to cast to them safely.
Implementations§
source§impl<L, S, D> ActorMap<L, S, D>where
L: ArticulationLink,
S: RigidStatic,
D: RigidDynamic,
impl<L, S, D> ActorMap<L, S, D>where L: ArticulationLink, S: RigidStatic, D: RigidDynamic,
sourcepub fn cast_map<'a, Ret, ALFn, RSFn, RDFn>(
&'a self,
articulation_link_fn: ALFn,
rigid_static_fn: RSFn,
rigid_dynamic_fn: RDFn
) -> Retwhere
ALFn: FnMut(&'a L) -> Ret,
RSFn: FnMut(&'a S) -> Ret,
RDFn: FnMut(&'a D) -> Ret,
pub fn cast_map<'a, Ret, ALFn, RSFn, RDFn>( &'a self, articulation_link_fn: ALFn, rigid_static_fn: RSFn, rigid_dynamic_fn: RDFn ) -> Retwhere ALFn: FnMut(&'a L) -> Ret, RSFn: FnMut(&'a S) -> Ret, RDFn: FnMut(&'a D) -> 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 not needed.
sourcepub fn cast_map_mut<'a, Ret, ALFn, RSFn, RDFn>(
&'a mut self,
articulation_link_fn: ALFn,
rigid_static_fn: RSFn,
rigid_dynamic_fn: RDFn
) -> Retwhere
ALFn: FnMut(&'a mut L) -> Ret,
RSFn: FnMut(&'a mut S) -> Ret,
RDFn: FnMut(&'a mut D) -> Ret,
pub fn cast_map_mut<'a, Ret, ALFn, RSFn, RDFn>( &'a mut self, articulation_link_fn: ALFn, rigid_static_fn: RSFn, rigid_dynamic_fn: RDFn ) -> Retwhere ALFn: FnMut(&'a mut L) -> Ret, RSFn: FnMut(&'a mut S) -> Ret, RDFn: FnMut(&'a mut D) -> 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 not needed.
sourcepub fn as_rigid_dynamic(&self) -> Option<&D>
pub fn as_rigid_dynamic(&self) -> Option<&D>
Tries to cast reference to RigidDynamic.
sourcepub fn as_rigid_dynamic_mut(&mut self) -> Option<&mut D>
pub fn as_rigid_dynamic_mut(&mut self) -> Option<&mut D>
Tries to cast mutable reference to RigidDynamic.
sourcepub fn as_rigid_static(&self) -> Option<&S>
pub fn as_rigid_static(&self) -> Option<&S>
Tries to cast reference to RigidStatic.
sourcepub fn as_rigid_static_mut(&mut self) -> Option<&mut S>
pub fn as_rigid_static_mut(&mut self) -> Option<&mut S>
Tries to cast mutable reference to RigidStatic.
sourcepub fn as_articulation_link(&self) -> Option<&L>
pub fn as_articulation_link(&self) -> Option<&L>
Tries to cast reference to ArticulationLink.
sourcepub fn as_articulation_link_mut(&mut self) -> Option<&mut L>
pub fn as_articulation_link_mut(&mut self) -> Option<&mut L>
Tries to cast mutable reference to ArticulationLink.
Trait Implementations§
source§impl<P, L, S, D> Class<P> for ActorMap<L, S, D>where
PxRigidActor: Class<P>,
L: ArticulationLink,
S: RigidStatic,
D: RigidDynamic,
impl<P, L, S, D> Class<P> for ActorMap<L, S, D>where PxRigidActor: Class<P>, L: ArticulationLink, S: RigidStatic, D: RigidDynamic,
source§fn as_ptr(&self) -> *const P
fn as_ptr(&self) -> *const P
source§fn as_mut_ptr(&mut self) -> *mut P
fn as_mut_ptr(&mut self) -> *mut P
source§impl<L, S, D> RigidActor for ActorMap<L, S, D>where
L: ArticulationLink,
S: RigidStatic,
D: RigidDynamic,
impl<L, S, D> RigidActor for ActorMap<L, S, D>where L: ArticulationLink, S: RigidStatic, D: RigidDynamic,
type Shape = <L as RigidActor>::Shape
source§fn get_nb_constraints(&self) -> u32
fn get_nb_constraints(&self) -> u32
source§fn get_constraints(&mut self) -> Vec<&mut Constraint>
fn get_constraints(&mut self) -> Vec<&mut Constraint>
source§fn get_global_pose(&self) -> PxTransform
fn get_global_pose(&self) -> PxTransform
source§fn get_global_position(&self) -> PxVec3
fn get_global_position(&self) -> PxVec3
source§fn get_global_rotation(&self) -> PxQuat
fn get_global_rotation(&self) -> PxQuat
source§fn set_global_pose(&mut self, pose: &PxTransform, autowake: bool)
fn set_global_pose(&mut self, pose: &PxTransform, autowake: bool)
source§fn get_nb_shapes(&self) -> u32
fn get_nb_shapes(&self) -> u32
source§fn get_shapes(&self) -> Vec<&Self::Shape>
fn get_shapes(&self) -> Vec<&Self::Shape>
source§fn get_shapes_mut(&mut self) -> Vec<&mut Self::Shape>
fn get_shapes_mut(&mut self) -> Vec<&mut Self::Shape>
source§fn set_collision_filter(
&mut self,
this_layers: CollisionLayers,
other_layers: CollisionLayers,
word3: u32,
word4: u32
)
fn set_collision_filter( &mut self, this_layers: CollisionLayers, other_layers: CollisionLayers, word3: u32, word4: u32 )
source§fn set_query_filter(&mut self, this_layers: CollisionLayers)
fn set_query_filter(&mut self, this_layers: CollisionLayers)
source§fn attach_shape(&mut self, shape: &mut Self::Shape) -> bool
fn attach_shape(&mut self, shape: &mut Self::Shape) -> bool
source§fn detach_shape(&mut self, shape: &mut Self::Shape)
fn detach_shape(&mut self, shape: &mut Self::Shape)
Auto Trait Implementations§
impl<L, S, D> RefUnwindSafe for ActorMap<L, S, D>where D: RefUnwindSafe, L: RefUnwindSafe, S: RefUnwindSafe,
impl<L, S, D> !Send for ActorMap<L, S, D>
impl<L, S, D> !Sync for ActorMap<L, S, D>
impl<L, S, D> Unpin for ActorMap<L, S, D>
impl<L, S, D> UnwindSafe for ActorMap<L, S, D>where D: RefUnwindSafe, L: RefUnwindSafe, S: RefUnwindSafe,
Blanket Implementations§
source§impl<T> Actor for Twhere
T: Class<PxActor> + Base,
impl<T> Actor for Twhere T: Class<PxActor> + Base,
source§fn get_world_bounds(&self, inflation: f32) -> PxBounds3
fn get_world_bounds(&self, inflation: f32) -> PxBounds3
source§fn set_actor_flag(&mut self, flag: ActorFlag, value: bool)
fn set_actor_flag(&mut self, flag: ActorFlag, value: bool)
source§fn set_actor_flags(&mut self, flags: ActorFlags)
fn set_actor_flags(&mut self, flags: ActorFlags)
source§fn get_actor_flags(&self) -> ActorFlags
fn get_actor_flags(&self) -> ActorFlags
source§fn set_dominance_group(&mut self, group: u8)
fn set_dominance_group(&mut self, group: u8)
source§fn get_dominance_group(&self) -> u8
fn get_dominance_group(&self) -> u8
source§fn set_owner_client(&mut self, client: u8)
fn set_owner_client(&mut self, client: u8)
source§fn get_owner_client(&self) -> u8
fn get_owner_client(&self) -> u8
source§fn enable_visualization(&mut self, enable: bool)
fn enable_visualization(&mut self, enable: bool)
source§fn enable_gravity(&mut self, enable: bool)
fn enable_gravity(&mut self, enable: bool)
source§impl<T> Base for Twhere
T: Class<PxBase>,
impl<T> Base for Twhere T: Class<PxBase>,
source§fn get_concrete_type_name(&self) -> Option<&str>
fn get_concrete_type_name(&self) -> Option<&str>
source§fn get_concrete_type(&self) -> ConcreteType
fn get_concrete_type(&self) -> ConcreteType
source§fn set_base_flag(&mut self, flag: BaseFlag, value: bool)
fn set_base_flag(&mut self, flag: BaseFlag, value: bool)
source§fn set_base_flags(&mut self, in_flags: BaseFlags)
fn set_base_flags(&mut self, in_flags: BaseFlags)
set_base_flag
to set individual flags.source§fn get_base_flags(&self) -> BaseFlags
fn get_base_flags(&self) -> BaseFlags
source§fn is_releasable(&self) -> bool
fn is_releasable(&self) -> bool
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> RigidBody for Twhere
T: Class<PxRigidBody> + RigidActor,
impl<T> RigidBody for Twhere T: Class<PxRigidBody> + RigidActor,
source§fn get_angular_velocity(&self) -> PxVec3
fn get_angular_velocity(&self) -> PxVec3
source§fn get_linear_velocity(&self) -> PxVec3
fn get_linear_velocity(&self) -> PxVec3
source§fn get_velocities(&self) -> (PxVec3, PxVec3)
fn get_velocities(&self) -> (PxVec3, PxVec3)
source§fn set_c_mass_local_pose(&mut self, pose: &PxTransform)
fn set_c_mass_local_pose(&mut self, pose: &PxTransform)
source§fn get_c_mass_local_pose(&self) -> PxTransform
fn get_c_mass_local_pose(&self) -> PxTransform
source§fn get_inv_mass(&self) -> f32
fn get_inv_mass(&self) -> f32
source§fn set_mass_space_inertia_tensor(&mut self, m: &PxVec3)
fn set_mass_space_inertia_tensor(&mut self, m: &PxVec3)
PxArticulationLink
s.source§fn get_mass_space_inertia_tensor(&self) -> PxVec3
fn get_mass_space_inertia_tensor(&self) -> PxVec3
source§fn get_mass_space_inv_inertia_tensor(&self) -> PxVec3
fn get_mass_space_inv_inertia_tensor(&self) -> PxVec3
source§fn set_linear_damping(&mut self, lin_damp: f32)
fn set_linear_damping(&mut self, lin_damp: f32)
source§fn get_linear_damping(&self) -> f32
fn get_linear_damping(&self) -> f32
source§fn set_angular_damping(&mut self, ang_damp: f32)
fn set_angular_damping(&mut self, ang_damp: f32)
source§fn get_angular_damping(&self) -> f32
fn get_angular_damping(&self) -> f32
source§fn set_max_angular_velocity(&mut self, max_ang_vel: f32)
fn set_max_angular_velocity(&mut self, max_ang_vel: f32)
source§fn get_max_angular_velocity(&self) -> f32
fn get_max_angular_velocity(&self) -> f32
source§fn set_max_linear_velocity(&mut self, max_lin_vel: f32)
fn set_max_linear_velocity(&mut self, max_lin_vel: f32)
source§fn get_max_linear_velocity(&self) -> f32
fn get_max_linear_velocity(&self) -> f32
source§fn add_force(&mut self, force: &PxVec3, mode: ForceMode, autowake: bool)
fn add_force(&mut self, force: &PxVec3, mode: ForceMode, autowake: bool)
ForceMode::Acceleration
and ForceMode::VelocityChange
directly effect the acceleration and velocity change
accumulators. ForceMode::Force
and ForceMode::Impulse
are multiplied by inverse mass first.source§fn add_torque(&mut self, torque: &PxVec3, mode: ForceMode, autowake: bool)
fn add_torque(&mut self, torque: &PxVec3, mode: ForceMode, autowake: bool)
ForceMode::Acceleration
and ForceMode::VelocityChange
directly effect the angular acceleration and angular velocity change
accumulators. ForceMode::Force
and ForceMode::Impulse
are multiplied by inverse mass first.source§fn clear_force(&mut self, mode: ForceMode)
fn clear_force(&mut self, mode: ForceMode)
ForceMode::Acceleration
and ForceMode::Force
clear the same accumulator, as do ForceMode::VelocityChange
and ForceMode::Impulse
.source§fn clear_torque(&mut self, mode: ForceMode)
fn clear_torque(&mut self, mode: ForceMode)
ForceMode::Acceleration
and ForceMode::Force
clear the same accumulator, as do ForceMode::VelocityChange
and ForceMode::Impulse
.