pub struct MotorJointDef {
pub base: JointDef,
pub linear_velocity: Vec2,
pub max_velocity_force: f32,
pub angular_velocity: f32,
pub max_velocity_torque: f32,
pub linear_hertz: f32,
pub linear_damping_ratio: f32,
pub max_spring_force: f32,
pub angular_hertz: f32,
pub angular_damping_ratio: f32,
pub max_spring_torque: f32,
pub internal_value: i32,
}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. (b2MotorJointDef)
Fields§
§base: JointDefBase joint definition
linear_velocity: Vec2The desired linear velocity
max_velocity_force: f32The maximum motor force in newtons
angular_velocity: f32The desired angular velocity
max_velocity_torque: f32The maximum motor torque in newton-meters
linear_hertz: f32Linear spring hertz for position control
linear_damping_ratio: f32Linear spring damping ratio
max_spring_force: f32Maximum spring force in newtons
angular_hertz: f32Angular spring hertz for position control
angular_damping_ratio: f32Angular spring damping ratio
max_spring_torque: f32Maximum spring torque in newton-meters
internal_value: i32Used internally to detect a valid definition. DO NOT SET.
Trait Implementations§
Source§impl Clone for MotorJointDef
impl Clone for MotorJointDef
Source§fn clone(&self) -> MotorJointDef
fn clone(&self) -> MotorJointDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MotorJointDef
Source§impl Debug for MotorJointDef
impl Debug for MotorJointDef
Source§impl Default for MotorJointDef
impl Default for MotorJointDef
Source§impl PartialEq for MotorJointDef
impl PartialEq for MotorJointDef
impl StructuralPartialEq for MotorJointDef
Auto Trait Implementations§
impl Freeze for MotorJointDef
impl RefUnwindSafe for MotorJointDef
impl Send for MotorJointDef
impl Sync for MotorJointDef
impl Unpin for MotorJointDef
impl UnsafeUnpin for MotorJointDef
impl UnwindSafe for MotorJointDef
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