Struct physx::articulation_joint_base::JointMap
source · [−]pub struct JointMap { /* private fields */ }
Expand description
A PxArticulatiopnJointBase new type wrapper with methods for safe casts.
Implementations
sourceimpl JointMap
impl JointMap
sourcepub unsafe fn cast_map<'a, Ret, ArtJoFn, ArcJoFn>(
&'a mut self,
art_fn: ArtJoFn,
arc_fn: ArcJoFn
) -> Retwhere
ArtJoFn: FnMut(&'a mut ArticulationJoint) -> Ret,
ArcJoFn: FnMut(&'a mut ArticulationJointReducedCoordinate) -> Ret,
pub unsafe fn cast_map<'a, Ret, ArtJoFn, ArcJoFn>(
&'a mut self,
art_fn: ArtJoFn,
arc_fn: ArcJoFn
) -> Retwhere
ArtJoFn: FnMut(&'a mut ArticulationJoint) -> Ret,
ArcJoFn: FnMut(&'a mut ArticulationJointReducedCoordinate) -> Ret,
Safety
this relies on get_concrete_type
to determine the joint 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, ArtJoFn, ArcJoFn>(
&mut self,
art_fn: ArtJoFn,
arc_fn: ArcJoFn
) -> Option<Ret>where
ArtJoFn: FnMut(&'a mut ArticulationJoint) -> Ret,
ArcJoFn: FnMut(&'a mut ArticulationJointReducedCoordinate) -> Ret,
pub fn as_articulation_joint(&mut self) -> Option<&mut ArticulationJoint>
pub fn as_articulation_joint_reduced_coordinate(
&mut self
) -> Option<&mut ArticulationJointReducedCoordinate>
Trait Implementations
sourceimpl<P> Class<P> for JointMapwhere
PxArticulationJointBase: Class<P>,
impl<P> Class<P> for JointMapwhere
PxArticulationJointBase: Class<P>,
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 RefUnwindSafe for JointMap
impl Send for JointMap
impl Sync for JointMap
impl Unpin for JointMap
impl UnwindSafe for JointMap
Blanket Implementations
sourceimpl<T> ArticulationJointBase for Twhere
T: Class<PxArticulationJointBase> + Base,
impl<T> ArticulationJointBase for Twhere
T: Class<PxArticulationJointBase> + Base,
sourcefn set_child_pose(&mut self, pose: &PxTransform)
fn set_child_pose(&mut self, pose: &PxTransform)
Set the pose of the joint in the child frame
sourcefn get_child_pose(&self) -> PxTransform
fn get_child_pose(&self) -> PxTransform
Get the pose of the joint in the child frame
sourcefn set_parent_pose(&mut self, pose: &PxTransform)
fn set_parent_pose(&mut self, pose: &PxTransform)
Set the pose of the joint in the parent frame
sourcefn get_parent_pose(&self) -> PxTransform
fn get_parent_pose(&self) -> PxTransform
Get the pose of the joint in the parent frame
sourcefn get_joint_transform_global(&self) -> PxTransform
fn get_joint_transform_global(&self) -> PxTransform
Get the global pose of this joint.
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