pub struct RevoluteJointDef {
pub base: JointDef,
pub target_angle: f32,
pub enable_spring: bool,
pub hertz: f32,
pub damping_ratio: f32,
pub enable_limit: bool,
pub lower_angle: f32,
pub upper_angle: f32,
pub enable_motor: bool,
pub max_motor_torque: f32,
pub motor_speed: f32,
pub internal_value: i32,
}Expand description
Revolute joint definition. A point on body B is fixed to a point on body A. Allows relative rotation. (b2RevoluteJointDef)
Fields§
§base: JointDefBase joint definition
target_angle: f32The target angle for the joint in radians. The spring-damper will drive to this angle.
enable_spring: boolEnable a rotational spring on the revolute hinge axis
hertz: f32The spring stiffness Hertz, cycles per second
damping_ratio: f32The spring damping ratio, non-dimensional
enable_limit: boolA flag to enable joint limits
lower_angle: f32The lower angle for the joint limit in radians. Minimum of -0.99*pi radians.
upper_angle: f32The upper angle for the joint limit in radians. Maximum of 0.99*pi radians.
enable_motor: boolA flag to enable the joint motor
max_motor_torque: f32The maximum motor torque, typically in newton-meters
motor_speed: f32The desired motor speed in radians per second
internal_value: i32Used internally to detect a valid definition. DO NOT SET.
Trait Implementations§
Source§impl Clone for RevoluteJointDef
impl Clone for RevoluteJointDef
Source§fn clone(&self) -> RevoluteJointDef
fn clone(&self) -> RevoluteJointDef
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 RevoluteJointDef
Source§impl Debug for RevoluteJointDef
impl Debug for RevoluteJointDef
Source§impl Default for RevoluteJointDef
impl Default for RevoluteJointDef
Source§impl PartialEq for RevoluteJointDef
impl PartialEq for RevoluteJointDef
impl StructuralPartialEq for RevoluteJointDef
Auto Trait Implementations§
impl Freeze for RevoluteJointDef
impl RefUnwindSafe for RevoluteJointDef
impl Send for RevoluteJointDef
impl Sync for RevoluteJointDef
impl Unpin for RevoluteJointDef
impl UnsafeUnpin for RevoluteJointDef
impl UnwindSafe for RevoluteJointDef
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