pub struct PrismaticJointDef {
pub base: JointDef,
pub enable_spring: bool,
pub hertz: f32,
pub damping_ratio: f32,
pub target_translation: f32,
pub enable_limit: bool,
pub lower_translation: f32,
pub upper_translation: f32,
pub enable_motor: bool,
pub max_motor_force: f32,
pub motor_speed: f32,
pub internal_value: i32,
}Expand description
Prismatic joint definition. Body B may slide along the x-axis in local frame A. Body B cannot rotate relative to body A. The joint translation is zero when the local frame origins coincide in world space. (b2PrismaticJointDef)
Fields§
§base: JointDefBase joint definition
enable_spring: boolEnable a linear spring along the prismatic joint axis
hertz: f32The spring stiffness Hertz, cycles per second
damping_ratio: f32The spring damping ratio, non-dimensional
target_translation: f32The target translation for the joint in meters. The spring-damper will drive to this translation.
enable_limit: boolEnable/disable the joint limit
lower_translation: f32The lower translation limit
upper_translation: f32The upper translation limit
enable_motor: boolEnable/disable the joint motor
max_motor_force: f32The maximum motor force, typically in newtons
motor_speed: f32The desired motor speed, typically in meters per second
internal_value: i32Used internally to detect a valid definition. DO NOT SET.
Trait Implementations§
Source§impl Clone for PrismaticJointDef
impl Clone for PrismaticJointDef
Source§fn clone(&self) -> PrismaticJointDef
fn clone(&self) -> PrismaticJointDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PrismaticJointDef
Source§impl Debug for PrismaticJointDef
impl Debug for PrismaticJointDef
Source§impl Default for PrismaticJointDef
impl Default for PrismaticJointDef
Source§impl PartialEq for PrismaticJointDef
impl PartialEq for PrismaticJointDef
Source§fn eq(&self, other: &PrismaticJointDef) -> bool
fn eq(&self, other: &PrismaticJointDef) -> bool
self and other values to be equal, and is used by ==.