pub struct JointBaseBuilder { /* private fields */ }Implementations§
Source§impl JointBaseBuilder
impl JointBaseBuilder
Sourcepub fn bodies<'w>(self, a: &Body<'w>, b: &Body<'w>) -> Self
pub fn bodies<'w>(self, a: &Body<'w>, b: &Body<'w>) -> Self
Attach two bodies using scoped body handles.
Sourcepub fn bodies_by_id(self, a: BodyId, b: BodyId) -> Self
pub fn bodies_by_id(self, a: BodyId, b: BodyId) -> Self
Attach two bodies by raw ids.
Sourcepub fn local_frames<VA: Into<Vec2>, VB: Into<Vec2>>(
self,
pos_a: VA,
angle_a: f32,
pos_b: VB,
angle_b: f32,
) -> Self
pub fn local_frames<VA: Into<Vec2>, VB: Into<Vec2>>( self, pos_a: VA, angle_a: f32, pos_b: VB, angle_b: f32, ) -> Self
Set local frames from positions and angles (radians).
pub fn collide_connected(self, flag: bool) -> Self
Sourcepub fn force_threshold(self, v: f32) -> Self
pub fn force_threshold(self, v: f32) -> Self
Force threshold for joint events.
Sourcepub fn torque_threshold(self, v: f32) -> Self
pub fn torque_threshold(self, v: f32) -> Self
Torque threshold for joint events.
Sourcepub fn constraint_hertz(self, v: f32) -> Self
pub fn constraint_hertz(self, v: f32) -> Self
Advanced constraint tuning frequency in Hertz.
Sourcepub fn constraint_damping_ratio(self, v: f32) -> Self
pub fn constraint_damping_ratio(self, v: f32) -> Self
Advanced constraint damping ratio.
pub fn draw_scale(self, v: f32) -> Self
pub fn local_frames_raw(self, a: b2Transform, b: b2Transform) -> Self
Sourcepub fn local_points_from_world<'w, V: Into<Vec2>>(
self,
body_a: &Body<'w>,
world_a: V,
body_b: &Body<'w>,
world_b: V,
) -> Self
pub fn local_points_from_world<'w, V: Into<Vec2>>( self, body_a: &Body<'w>, world_a: V, body_b: &Body<'w>, world_b: V, ) -> Self
Set local anchor positions from world points (rotation remains identity).
pub fn build(self) -> JointBase
Sourcepub fn frames_from_world_with_axis<'w, VA, VB, AX>(
self,
body_a: &Body<'w>,
anchor_a_world: VA,
axis_world: AX,
body_b: &Body<'w>,
anchor_b_world: VB,
) -> Self
pub fn frames_from_world_with_axis<'w, VA, VB, AX>( self, body_a: &Body<'w>, anchor_a_world: VA, axis_world: AX, body_b: &Body<'w>, anchor_b_world: VB, ) -> Self
Set local frames using world anchors and a shared world axis (X-axis of joint frame). This computes localFrameA/B.rotation so that their X-axis aligns with the given world axis, and localFrameA/B.position to the given world anchor points.
Trait Implementations§
Source§impl Clone for JointBaseBuilder
impl Clone for JointBaseBuilder
Source§fn clone(&self) -> JointBaseBuilder
fn clone(&self) -> JointBaseBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JointBaseBuilder
impl Debug for JointBaseBuilder
Source§impl Default for JointBaseBuilder
impl Default for JointBaseBuilder
Auto Trait Implementations§
impl Freeze for JointBaseBuilder
impl RefUnwindSafe for JointBaseBuilder
impl !Send for JointBaseBuilder
impl !Sync for JointBaseBuilder
impl Unpin for JointBaseBuilder
impl UnsafeUnpin for JointBaseBuilder
impl UnwindSafe for JointBaseBuilder
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