pub struct WheelJointBuilder<'w> { /* private fields */ }Expand description
Fluent builder for wheel joints using world anchors and axis.
Implementations§
Source§impl<'w> WheelJointBuilder<'w>
impl<'w> WheelJointBuilder<'w>
Sourcepub fn anchors_world<VA: Into<Vec2>, VB: Into<Vec2>>(self, a: VA, b: VB) -> Self
pub fn anchors_world<VA: Into<Vec2>, VB: Into<Vec2>>(self, a: VA, b: VB) -> Self
Set world-space anchors for A and B.
Sourcepub fn axis_world<V: Into<Vec2>>(self, axis: V) -> Self
pub fn axis_world<V: Into<Vec2>>(self, axis: V) -> Self
Set wheel axis in world space.
pub fn limit(self, lower: f32, upper: f32) -> Self
pub fn motor(self, max_torque: f32, speed: f32) -> Self
pub fn motor_deg(self, max_torque: f32, speed_deg: f32) -> Self
pub fn spring(self, hertz: f32, damping_ratio: f32) -> Self
pub fn collide_connected(self, flag: bool) -> Self
Sourcepub fn with_limit_and_motor(
self,
lower: f32,
upper: f32,
max_torque: f32,
speed: f32,
) -> Self
pub fn with_limit_and_motor( self, lower: f32, upper: f32, max_torque: f32, speed: f32, ) -> Self
Convenience: enable limit and motor together.
- lower/upper: meters
- max_torque: N·m; speed: rad/s
Sourcepub fn with_limit_and_motor_deg(
self,
lower: f32,
upper: f32,
max_torque: f32,
speed_deg: f32,
) -> Self
pub fn with_limit_and_motor_deg( self, lower: f32, upper: f32, max_torque: f32, speed_deg: f32, ) -> Self
Convenience: enable limit and motor together (motor speed in degrees/sec).
- lower/upper: meters
- max_torque: N·m; speed_deg: deg/s
Sourcepub fn with_limit_and_spring(
self,
lower: f32,
upper: f32,
hertz: f32,
damping_ratio: f32,
) -> Self
pub fn with_limit_and_spring( self, lower: f32, upper: f32, hertz: f32, damping_ratio: f32, ) -> Self
Convenience: enable limit and spring together.
- lower/upper: meters
- hertz: stiffness (Hz), typical 4–20; damping_ratio: [0,1], typical 0.1–0.7
Sourcepub fn with_motor_and_spring(
self,
max_torque: f32,
speed: f32,
hertz: f32,
damping_ratio: f32,
) -> Self
pub fn with_motor_and_spring( self, max_torque: f32, speed: f32, hertz: f32, damping_ratio: f32, ) -> Self
Convenience: enable motor and spring together.
- max_torque: N·m; speed: rad/s; hertz: Hz; damping_ratio: [0,1]
Sourcepub fn with_motor_and_spring_deg(
self,
max_torque: f32,
speed_deg: f32,
hertz: f32,
damping_ratio: f32,
) -> Self
pub fn with_motor_and_spring_deg( self, max_torque: f32, speed_deg: f32, hertz: f32, damping_ratio: f32, ) -> Self
Convenience: enable motor and spring together (motor speed in degrees/sec).
- max_torque: N·m; speed_deg: deg/s; hertz: Hz; damping_ratio: [0,1]
Sourcepub fn with_limit_motor_spring(
self,
lower: f32,
upper: f32,
max_torque: f32,
speed: f32,
hertz: f32,
damping_ratio: f32,
) -> Self
pub fn with_limit_motor_spring( self, lower: f32, upper: f32, max_torque: f32, speed: f32, hertz: f32, damping_ratio: f32, ) -> Self
Convenience: enable limit, motor, and spring together.
- lower/upper: meters
- max_torque: N·m; speed: rad/s; hertz: Hz; damping_ratio: [0,1]
Sourcepub fn with_limit_motor_spring_deg(
self,
lower: f32,
upper: f32,
max_torque: f32,
speed_deg: f32,
hertz: f32,
damping_ratio: f32,
) -> Self
pub fn with_limit_motor_spring_deg( self, lower: f32, upper: f32, max_torque: f32, speed_deg: f32, hertz: f32, damping_ratio: f32, ) -> Self
Convenience: enable limit, motor (deg/s), and spring together.
- lower/upper: meters
- max_torque: N·m; speed_deg: deg/s; hertz: Hz; damping_ratio: [0,1]
pub fn build(self) -> Joint<'w>
pub fn try_build(self) -> ApiResult<Joint<'w>>
pub fn build_owned(self) -> OwnedJoint
pub fn try_build_owned(self) -> ApiResult<OwnedJoint>
Auto Trait Implementations§
impl<'w> Freeze for WheelJointBuilder<'w>
impl<'w> RefUnwindSafe for WheelJointBuilder<'w>
impl<'w> !Send for WheelJointBuilder<'w>
impl<'w> !Sync for WheelJointBuilder<'w>
impl<'w> Unpin for WheelJointBuilder<'w>
impl<'w> UnsafeUnpin for WheelJointBuilder<'w>
impl<'w> !UnwindSafe for WheelJointBuilder<'w>
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