Skip to main content

WheelJointBuilder

Struct WheelJointBuilder 

Source
pub struct WheelJointBuilder<'w> { /* private fields */ }
Expand description

Fluent builder for wheel joints using world anchors and axis.

Implementations§

Source§

impl<'w> WheelJointBuilder<'w>

Source

pub fn anchors_world<VA: Into<Vec2>, VB: Into<Vec2>>(self, a: VA, b: VB) -> Self

Set world-space anchors for A and B.

Source

pub fn axis_world<V: Into<Vec2>>(self, axis: V) -> Self

Set wheel axis in world space.

Source

pub fn limit(self, lower: f32, upper: f32) -> Self

Source

pub fn motor(self, max_torque: f32, speed: f32) -> Self

Source

pub fn motor_deg(self, max_torque: f32, speed_deg: f32) -> Self

Source

pub fn spring(self, hertz: f32, damping_ratio: f32) -> Self

Source

pub fn collide_connected(self, flag: bool) -> Self

Source

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
Source

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
Source

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
Source

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]
Source

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]
Source

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]
Source

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]
Source

pub fn build(self) -> Joint<'w>

Source

pub fn try_build(self) -> ApiResult<Joint<'w>>

Source

pub fn build_owned(self) -> OwnedJoint

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.