#[repr(C)]pub struct b2JointDef {
pub userData: *mut c_void,
pub bodyIdA: b2BodyId,
pub bodyIdB: b2BodyId,
pub localFrameA: b2Transform,
pub localFrameB: b2Transform,
pub forceThreshold: f32,
pub torqueThreshold: f32,
pub constraintHertz: f32,
pub constraintDampingRatio: f32,
pub drawScale: f32,
pub collideConnected: bool,
}Expand description
Base joint definition used by all joint types. The local frames are measured from the body’s origin rather than the center of mass because:
- you might not know where the center of mass will be
- if you add/remove shapes from a body and recompute the mass, the joints will be broken
Fields§
§userData: *mut c_voidUser data pointer
bodyIdA: b2BodyIdThe first attached body
bodyIdB: b2BodyIdThe second attached body
localFrameA: b2TransformThe first local joint frame
localFrameB: b2TransformThe second local joint frame
forceThreshold: f32Force threshold for joint events
torqueThreshold: f32Torque threshold for joint events
constraintHertz: f32Constraint hertz (advanced feature)
constraintDampingRatio: f32Constraint damping ratio (advanced feature)
drawScale: f32Debug draw scale
collideConnected: boolSet this flag to true if the attached bodies should collide
Trait Implementations§
Source§impl Clone for b2JointDef
impl Clone for b2JointDef
Source§fn clone(&self) -> b2JointDef
fn clone(&self) -> b2JointDef
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 b2JointDef
impl Debug for b2JointDef
impl Copy for b2JointDef
Auto Trait Implementations§
impl Freeze for b2JointDef
impl RefUnwindSafe for b2JointDef
impl !Send for b2JointDef
impl !Sync for b2JointDef
impl Unpin for b2JointDef
impl UnwindSafe for b2JointDef
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)