#[repr(C)]pub struct b2MotorJointDef {
pub base: b2JointDef,
pub linearVelocity: b2Vec2,
pub maxVelocityForce: f32,
pub angularVelocity: f32,
pub maxVelocityTorque: f32,
pub linearHertz: f32,
pub linearDampingRatio: f32,
pub maxSpringForce: f32,
pub angularHertz: f32,
pub angularDampingRatio: f32,
pub maxSpringTorque: f32,
pub internalValue: c_int,
}Expand description
A motor joint is used to control the relative velocity and or transform between two bodies. With a velocity of zero this acts like top-down friction. @ingroup motor_joint
Fields§
§base: b2JointDefBase joint definition
linearVelocity: b2Vec2The desired linear velocity
maxVelocityForce: f32The maximum motor force in newtons
angularVelocity: f32The desired angular velocity
maxVelocityTorque: f32The maximum motor torque in newton-meters
linearHertz: f32Linear spring hertz for position control
linearDampingRatio: f32Linear spring damping ratio
maxSpringForce: f32Maximum spring force in newtons
angularHertz: f32Angular spring hertz for position control
angularDampingRatio: f32Angular spring damping ratio
maxSpringTorque: f32Maximum spring torque in newton-meters
internalValue: c_intUsed internally to detect a valid definition. DO NOT SET.
Trait Implementations§
Source§impl Clone for b2MotorJointDef
impl Clone for b2MotorJointDef
Source§fn clone(&self) -> b2MotorJointDef
fn clone(&self) -> b2MotorJointDef
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for b2MotorJointDef
impl Debug for b2MotorJointDef
impl Copy for b2MotorJointDef
Auto Trait Implementations§
impl Freeze for b2MotorJointDef
impl RefUnwindSafe for b2MotorJointDef
impl !Send for b2MotorJointDef
impl !Sync for b2MotorJointDef
impl Unpin for b2MotorJointDef
impl UnwindSafe for b2MotorJointDef
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)