Struct physx::articulation::PxArticulation
source · [−]#[repr(transparent)]pub struct PxArticulation<U, Link: ArticulationLink> { /* private fields */ }
Expand description
A new type wrapper for PxArticulation. Parametrized by it’s user data type, and the type of it’s ArticulationLinks.
Trait Implementations
sourceimpl<U, Link: ArticulationLink> Articulation for PxArticulation<U, Link>
impl<U, Link: ArticulationLink> Articulation for PxArticulation<U, Link>
sourceunsafe fn from_raw(
ptr: *mut PxArticulation,
user_data: Self::UserData
) -> Option<Owner<Self>>
unsafe fn from_raw(
ptr: *mut PxArticulation,
user_data: Self::UserData
) -> Option<Owner<Self>>
Safety Read more
sourcefn get_user_data(&self) -> &Self::UserData
fn get_user_data(&self) -> &Self::UserData
Get a reference to the user data.
sourcefn get_user_data_mut(&mut self) -> &mut Self::UserData
fn get_user_data_mut(&mut self) -> &mut Self::UserData
Get a mutable reference to the user data.
fn apply_impulse(
&mut self,
link: &mut Self::ArticulationLink,
cache: &PxArticulationDriveCache,
linear_impulse: &PxVec3,
angular_impulse: &PxVec3
)
fn compute_impulse_response(
&self,
link: &mut Self::ArticulationLink,
cache: &PxArticulationDriveCache,
linear_impulse: &PxVec3,
angular_impulse: &PxVec3
) -> ImpulseResponse
fn create_drive_cache(
&self,
compliance: f32,
drive_iterations: u32
) -> Option<&mut PxArticulationDriveCache>
fn update_drive_cache(
&self,
cache: &mut PxArticulationDriveCache,
compliance: f32,
iterations: u32
)
fn get_external_drive_iterations(&self) -> u32
fn get_internal_drive_iterations(&self) -> u32
fn get_max_projection_iterations(&self) -> u32
fn get_separation_tolerance(&self) -> f32
fn release_drive_cache(&self, cache: &mut PxArticulationDriveCache)
fn set_external_drive_iterations(&mut self, iterations: u32)
fn set_internal_drive_iterations(&mut self, iterations: u32)
fn set_max_projection_iterations(&mut self, iterations: u32)
fn set_separation_tolerance(&mut self, tolerance: f32)
sourceimpl<U, Link: ArticulationLink> ArticulationBase for PxArticulation<U, Link>
impl<U, Link: ArticulationLink> ArticulationBase for PxArticulation<U, Link>
type ArticulationLink = Link
sourcefn set_solver_iteration_counts(
&mut self,
min_position_iters: u32,
min_velocity_iters: u32
)
fn set_solver_iteration_counts(
&mut self,
min_position_iters: u32,
min_velocity_iters: u32
)
Sets the number of iterations the solver should perform. If the articulation is behaving erratically, increasing the iteration counts may improve stability. Read more
sourcefn get_solver_iteration_counts(&self) -> (u32, u32)
fn get_solver_iteration_counts(&self) -> (u32, u32)
Get the number of (position, velocity) iterations the solver will perform.
sourcefn is_sleeping(&self) -> bool
fn is_sleeping(&self) -> bool
Check if the articulation is sleeping
sourcefn set_sleep_threshold(&mut self, threshold: f32)
fn set_sleep_threshold(&mut self, threshold: f32)
Set the inactivity threshold for sleeping this articulation
sourcefn get_sleep_threshold(&self) -> f32
fn get_sleep_threshold(&self) -> f32
Read back the inactivity threshold
sourcefn set_stabilization_threshold(&mut self, threshold: f32)
fn set_stabilization_threshold(&mut self, threshold: f32)
Set the stabilization threshold for this articulation
sourcefn get_stabilization_threshold(&self) -> f32
fn get_stabilization_threshold(&self) -> f32
Get the stabilization threshold for this articulation
sourcefn set_wake_counter(&mut self, threshold: f32)
fn set_wake_counter(&mut self, threshold: f32)
Set the counter for how many steps more the articulation will be awake if below the energy threshold. When this is non-zero, the articulation may sleep but is not required to do so depending on other factors. Read more
sourcefn get_wake_counter(&self) -> f32
fn get_wake_counter(&self) -> f32
Get the counter for how many steps more the agent will be awake if below the energy threshold.
sourcefn put_to_sleep(&mut self)
fn put_to_sleep(&mut self)
Put the articulation to sleep immediately
sourcefn get_nb_links(&self) -> usize
fn get_nb_links(&self) -> usize
Get the total number of links on this articulation
sourcefn root_link(&self) -> Option<&Self::ArticulationLink>
fn root_link(&self) -> Option<&Self::ArticulationLink>
Get a reference the root link of this articulation if it has one
sourcefn root_link_mut(&mut self) -> Option<&mut Self::ArticulationLink>
fn root_link_mut(&mut self) -> Option<&mut Self::ArticulationLink>
Get a mutable reference to the root link of this articulation if it has one
sourcefn get_links(&self) -> Vec<&Self::ArticulationLink>
fn get_links(&self) -> Vec<&Self::ArticulationLink>
Get a vec of all the links
sourcefn get_links_mut(&mut self) -> Vec<&mut Self::ArticulationLink>
fn get_links_mut(&mut self) -> Vec<&mut Self::ArticulationLink>
Get a mutable vec of all the links
sourcefn get_world_bounds(&self, inflation: f32) -> PxBounds3
fn get_world_bounds(&self, inflation: f32) -> PxBounds3
Get the world bounds of this articulation
sourcefn create_link(
&mut self,
parent: Option<&mut Self::ArticulationLink>,
pose: &PxTransform,
user_data: <Self::ArticulationLink as UserData>::UserData
) -> Option<&mut Self::ArticulationLink>
fn create_link(
&mut self,
parent: Option<&mut Self::ArticulationLink>,
pose: &PxTransform,
user_data: <Self::ArticulationLink as UserData>::UserData
) -> Option<&mut Self::ArticulationLink>
Add a link to this articulation
sourcefn create_articulation_joint<J: ArticulationJointBase>(
&mut self,
parent: &mut Self::ArticulationLink,
parent_frame: &PxTransform,
child: &mut Self::ArticulationLink,
child_frame: &PxTransform
) -> Option<&mut J>
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>
Create a joint between two articulation Links
sourceunsafe fn release_articulation_joint(
&mut self,
joint: &mut impl ArticulationJointBase
)
unsafe fn release_articulation_joint(
&mut self,
joint: &mut impl ArticulationJointBase
)
Release an articulation joint, freeing it. Read more
sourceimpl<S, U, Link: ArticulationLink> Class<S> for PxArticulation<U, Link> where
PxArticulation: Class<S>,
impl<S, U, Link: ArticulationLink> Class<S> for PxArticulation<U, Link> where
PxArticulation: Class<S>,
sourcefn as_ptr(&self) -> *const S
fn as_ptr(&self) -> *const S
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 S
fn as_mut_ptr(&mut self) -> *mut S
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
sourceimpl<U, Link: ArticulationLink> Drop for PxArticulation<U, Link>
impl<U, Link: ArticulationLink> Drop for PxArticulation<U, Link>
impl<U: Send, Link: ArticulationLink + Send> Send for PxArticulation<U, Link>
impl<U: Sync, Link: ArticulationLink + Sync> Sync for PxArticulation<U, Link>
Auto Trait Implementations
impl<U, Link> RefUnwindSafe for PxArticulation<U, Link> where
Link: RefUnwindSafe,
U: RefUnwindSafe,
impl<U, Link> Unpin for PxArticulation<U, Link> where
Link: Unpin,
U: Unpin,
impl<U, Link> UnwindSafe for PxArticulation<U, Link> where
Link: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> Actor for T where
T: Class<PxActor> + Base,
impl<T> Actor for T where
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 T where
T: Class<PxBase>,
impl<T> Base for T where
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 more
sourcefn 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 more
sourcefn 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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