pub struct b2MotorJoint { /* private fields */ }Expand description
A motor joint is used to control the relative motion between two bodies. A typical usage is to control the movement of a dynamic body with respect to the ground.
Implementations§
Source§impl b2MotorJoint
impl b2MotorJoint
Sourcepub fn SetMaxForce(self: Pin<&mut b2MotorJoint>, force: f32)
pub fn SetMaxForce(self: Pin<&mut b2MotorJoint>, force: f32)
Set the maximum friction force in N.
Sourcepub fn GetMaxForce(self: &b2MotorJoint) -> f32
pub fn GetMaxForce(self: &b2MotorJoint) -> f32
Get the maximum friction force in N.
Sourcepub fn SetMaxTorque(self: Pin<&mut b2MotorJoint>, torque: f32)
pub fn SetMaxTorque(self: Pin<&mut b2MotorJoint>, torque: f32)
Set the maximum friction torque in N*m.
Sourcepub fn GetMaxTorque(self: &b2MotorJoint) -> f32
pub fn GetMaxTorque(self: &b2MotorJoint) -> f32
Get the maximum friction torque in N*m.
pub fn GetAnchorA(self: &b2MotorJoint) -> b2Vec2
pub fn GetAnchorB(self: &b2MotorJoint) -> b2Vec2
pub fn GetReactionForce(self: &b2MotorJoint, inv_dt: f32) -> b2Vec2
pub fn GetReactionTorque(self: &b2MotorJoint, inv_dt: f32) -> f32
Sourcepub fn Dump(self: Pin<&mut b2MotorJoint>)
pub fn Dump(self: Pin<&mut b2MotorJoint>)
Dump to b2Log
Source§impl b2MotorJoint
impl b2MotorJoint
Sourcepub fn SetLinearOffset(self: Pin<&mut Self>, linearOffset: &b2Vec2)
pub fn SetLinearOffset(self: Pin<&mut Self>, linearOffset: &b2Vec2)
Set/get the target linear offset, in frame A, in meters.
pub fn GetLinearOffset<'a>(&'a self) -> &'a b2Vec2
Sourcepub fn SetAngularOffset(self: Pin<&mut Self>, angularOffset: f32)
pub fn SetAngularOffset(self: Pin<&mut Self>, angularOffset: f32)
Set/get the target angular offset, in radians.
pub fn GetAngularOffset(&self) -> f32
Sourcepub fn SetCorrectionFactor(self: Pin<&mut Self>, factor: f32)
pub fn SetCorrectionFactor(self: Pin<&mut Self>, factor: f32)
Set the position correction factor in the range [0,1].
Sourcepub fn GetCorrectionFactor(&self) -> f32
pub fn GetCorrectionFactor(&self) -> f32
Get the position correction factor in the range [0,1].
Trait Implementations§
Source§impl AsRef<b2Joint> for b2MotorJoint
impl AsRef<b2Joint> for b2MotorJoint
Source§fn as_ref(self: &b2MotorJoint) -> &b2Joint
fn as_ref(self: &b2MotorJoint) -> &b2Joint
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl CopyNew for b2MotorJoint
impl CopyNew for b2MotorJoint
Source§unsafe fn copy_new(
other: &b2MotorJoint,
this: Pin<&mut MaybeUninit<b2MotorJoint>>,
)
unsafe fn copy_new( other: &b2MotorJoint, this: Pin<&mut MaybeUninit<b2MotorJoint>>, )
Synthesized copy constructor.
Source§impl Drop for b2MotorJoint
impl Drop for b2MotorJoint
Source§fn drop(self: &mut b2MotorJoint)
fn drop(self: &mut b2MotorJoint)
Synthesized destructor.
Source§impl ExternType for b2MotorJoint
impl ExternType for b2MotorJoint
Source§impl MakeCppStorage for b2MotorJoint
impl MakeCppStorage for b2MotorJoint
Source§unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2MotorJoint
unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2MotorJoint
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 b2MotorJoint)
unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2MotorJoint)
Frees a C++ allocation which has not yet
had a constructor called. Read more
impl UniquePtrTarget for b2MotorJoint
impl WeakPtrTarget for b2MotorJoint
Auto Trait Implementations§
impl !Send for b2MotorJoint
impl !Sync for b2MotorJoint
impl !Unpin for b2MotorJoint
impl Freeze for b2MotorJoint
impl RefUnwindSafe for b2MotorJoint
impl UnsafeUnpin for b2MotorJoint
impl UnwindSafe for b2MotorJoint
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