#[repr(C)]pub struct b2PrismaticJointDef {Show 18 fields
pub bodyIdA: b2BodyId,
pub bodyIdB: b2BodyId,
pub localAnchorA: b2Vec2,
pub localAnchorB: b2Vec2,
pub localAxisA: b2Vec2,
pub referenceAngle: f32,
pub enableSpring: bool,
pub hertz: f32,
pub dampingRatio: f32,
pub enableLimit: bool,
pub lowerTranslation: f32,
pub upperTranslation: f32,
pub enableMotor: bool,
pub maxMotorForce: f32,
pub motorSpeed: f32,
pub collideConnected: bool,
pub userData: *mut c_void,
pub internalValue: i32,
}Expand description
Prismatic joint definition
This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. @ingroup prismatic_joint
Fields§
§bodyIdA: b2BodyIdThe first attached body
bodyIdB: b2BodyIdThe second attached body
localAnchorA: b2Vec2The local anchor point relative to bodyA’s origin
localAnchorB: b2Vec2The local anchor point relative to bodyB’s origin
localAxisA: b2Vec2The local translation unit axis in bodyA
referenceAngle: f32The constrained angle between the bodies: bodyB_angle - bodyA_angle
enableSpring: boolEnable a linear spring along the prismatic joint axis
hertz: f32The spring stiffness Hertz, cycles per second
dampingRatio: f32The spring damping ratio, non-dimensional
enableLimit: boolEnable/disable the joint limit
lowerTranslation: f32The lower translation limit
upperTranslation: f32The upper translation limit
enableMotor: boolEnable/disable the joint motor
maxMotorForce: f32The maximum motor force, typically in newtons
motorSpeed: f32The desired motor speed, typically in meters per second
collideConnected: boolSet this flag to true if the attached bodies should collide
userData: *mut c_voidUser data pointer
internalValue: i32Used internally to detect a valid definition. DO NOT SET.
Trait Implementations§
Source§impl Clone for b2PrismaticJointDef
impl Clone for b2PrismaticJointDef
Source§fn clone(&self) -> b2PrismaticJointDef
fn clone(&self) -> b2PrismaticJointDef
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for b2PrismaticJointDef
impl Debug for b2PrismaticJointDef
impl Copy for b2PrismaticJointDef
Auto Trait Implementations§
impl Freeze for b2PrismaticJointDef
impl RefUnwindSafe for b2PrismaticJointDef
impl !Send for b2PrismaticJointDef
impl !Sync for b2PrismaticJointDef
impl Unpin for b2PrismaticJointDef
impl UnwindSafe for b2PrismaticJointDef
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)