pub struct b2FrictionJoint { /* private fields */ }Expand description
Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.
Implementations§
Source§impl b2FrictionJoint
impl b2FrictionJoint
Sourcepub fn GetLocalAnchorA(self: &b2FrictionJoint) -> &b2Vec2
pub fn GetLocalAnchorA(self: &b2FrictionJoint) -> &b2Vec2
The local anchor point relative to bodyA’s origin.
Sourcepub fn GetLocalAnchorB(self: &b2FrictionJoint) -> &b2Vec2
pub fn GetLocalAnchorB(self: &b2FrictionJoint) -> &b2Vec2
The local anchor point relative to bodyB’s origin.
pub fn GetAnchorA(self: &b2FrictionJoint) -> b2Vec2
pub fn GetAnchorB(self: &b2FrictionJoint) -> b2Vec2
pub fn GetReactionForce(self: &b2FrictionJoint, inv_dt: f32) -> b2Vec2
pub fn GetReactionTorque(self: &b2FrictionJoint, inv_dt: f32) -> f32
Sourcepub fn Dump(self: Pin<&mut b2FrictionJoint>)
pub fn Dump(self: Pin<&mut b2FrictionJoint>)
Dump joint to dmLog
Source§impl b2FrictionJoint
impl b2FrictionJoint
Sourcepub fn SetMaxForce(self: Pin<&mut Self>, force: f32)
pub fn SetMaxForce(self: Pin<&mut Self>, force: f32)
Set the maximum friction force in N.
Sourcepub fn GetMaxForce(&self) -> f32
pub fn GetMaxForce(&self) -> f32
Get the maximum friction force in N.
Sourcepub fn SetMaxTorque(self: Pin<&mut Self>, torque: f32)
pub fn SetMaxTorque(self: Pin<&mut Self>, torque: f32)
Set the maximum friction torque in N*m.
Sourcepub fn GetMaxTorque(&self) -> f32
pub fn GetMaxTorque(&self) -> f32
Get the maximum friction torque in N*m.
Trait Implementations§
Source§impl AsRef<b2Joint> for b2FrictionJoint
impl AsRef<b2Joint> for b2FrictionJoint
Source§fn as_ref(self: &b2FrictionJoint) -> &b2Joint
fn as_ref(self: &b2FrictionJoint) -> &b2Joint
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl CopyNew for b2FrictionJoint
impl CopyNew for b2FrictionJoint
Source§unsafe fn copy_new(
other: &b2FrictionJoint,
this: Pin<&mut MaybeUninit<b2FrictionJoint>>,
)
unsafe fn copy_new( other: &b2FrictionJoint, this: Pin<&mut MaybeUninit<b2FrictionJoint>>, )
Synthesized copy constructor.
Source§impl Drop for b2FrictionJoint
impl Drop for b2FrictionJoint
Source§fn drop(self: &mut b2FrictionJoint)
fn drop(self: &mut b2FrictionJoint)
Synthesized destructor.
Source§impl ExternType for b2FrictionJoint
impl ExternType for b2FrictionJoint
Source§impl MakeCppStorage for b2FrictionJoint
impl MakeCppStorage for b2FrictionJoint
Source§unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2FrictionJoint
unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2FrictionJoint
Allocates heap space for this type in C++ and return a pointer
to that space, but do not initialize that space (i.e. do not
yet call a constructor). Read more
Source§unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2FrictionJoint)
unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2FrictionJoint)
Frees a C++ allocation which has not yet
had a constructor called. Read more
impl UniquePtrTarget for b2FrictionJoint
impl WeakPtrTarget for b2FrictionJoint
Auto Trait Implementations§
impl Freeze for b2FrictionJoint
impl RefUnwindSafe for b2FrictionJoint
impl !Send for b2FrictionJoint
impl !Sync for b2FrictionJoint
impl !Unpin for b2FrictionJoint
impl UnwindSafe for b2FrictionJoint
Blanket Implementations§
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
Mutably borrows from an owned value. Read more