#[repr(C)]pub struct b2DistanceJointDef {Show 14 fields
pub base: b2JointDef,
pub length: f32,
pub enableSpring: bool,
pub lowerSpringForce: f32,
pub upperSpringForce: f32,
pub hertz: f32,
pub dampingRatio: f32,
pub enableLimit: bool,
pub minLength: f32,
pub maxLength: f32,
pub enableMotor: bool,
pub maxMotorForce: f32,
pub motorSpeed: f32,
pub internalValue: c_int,
}Expand description
Distance joint definition Connects a point on body A with a point on body B by a segment. Useful for ropes and springs. @ingroup distance_joint
Fields§
§base: b2JointDefBase joint definition
length: f32The rest length of this joint. Clamped to a stable minimum value.
enableSpring: boolEnable the distance constraint to behave like a spring. If false then the distance joint will be rigid, overriding the limit and motor.
lowerSpringForce: f32The lower spring force controls how much tension it can sustain
upperSpringForce: f32The upper spring force controls how much compression it an sustain
hertz: f32The spring linear stiffness Hertz, cycles per second
dampingRatio: f32The spring linear damping ratio, non-dimensional
enableLimit: boolEnable/disable the joint limit
minLength: f32Minimum length for limit. Clamped to a stable minimum value.
maxLength: f32Maximum length for limit. Must be greater than or equal to the minimum length.
enableMotor: boolEnable/disable the joint motor
maxMotorForce: f32The maximum motor force, usually in newtons
motorSpeed: f32The desired motor speed, usually in meters per second
internalValue: c_intUsed internally to detect a valid definition. DO NOT SET.
Trait Implementations§
Source§impl Clone for b2DistanceJointDef
impl Clone for b2DistanceJointDef
Source§fn clone(&self) -> b2DistanceJointDef
fn clone(&self) -> b2DistanceJointDef
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for b2DistanceJointDef
impl Debug for b2DistanceJointDef
impl Copy for b2DistanceJointDef
Auto Trait Implementations§
impl Freeze for b2DistanceJointDef
impl RefUnwindSafe for b2DistanceJointDef
impl !Send for b2DistanceJointDef
impl !Sync for b2DistanceJointDef
impl Unpin for b2DistanceJointDef
impl UnwindSafe for b2DistanceJointDef
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
§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)
clone_to_uninit)