Struct box2d_rs::joints::b2_pulley_joint::B2pulleyJointDef
source · pub struct B2pulleyJointDef<D: UserDataType> {
pub base: B2jointDef<D>,
pub ground_anchor_a: B2vec2,
pub ground_anchor_b: B2vec2,
pub local_anchor_a: B2vec2,
pub local_anchor_b: B2vec2,
pub length_a: f32,
pub length_b: f32,
pub ratio: f32,
}
Expand description
Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, and a pulley ratio.
Fields§
§base: B2jointDef<D>
§ground_anchor_a: B2vec2
The first ground anchor in world coordinates. This point never moves.
ground_anchor_b: B2vec2
The second ground anchor in world coordinates. This point never moves.
local_anchor_a: B2vec2
The local anchor point relative to body_a’s origin.
local_anchor_b: B2vec2
The local anchor point relative to body_b’s origin.
length_a: f32
The a reference length for the segment attached to body_a.
length_b: f32
The a reference length for the segment attached to body_b.
ratio: f32
The pulley ratio, used to simulate a block-and-tackle.
Implementations§
source§impl<D: UserDataType> B2pulleyJointDef<D>
impl<D: UserDataType> B2pulleyJointDef<D>
Trait Implementations§
source§impl<D: Clone + UserDataType> Clone for B2pulleyJointDef<D>
impl<D: Clone + UserDataType> Clone for B2pulleyJointDef<D>
source§fn clone(&self) -> B2pulleyJointDef<D>
fn clone(&self) -> B2pulleyJointDef<D>
Returns a copy 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<D: UserDataType> Default for B2pulleyJointDef<D>
impl<D: UserDataType> Default for B2pulleyJointDef<D>
Auto Trait Implementations§
impl<D> !RefUnwindSafe for B2pulleyJointDef<D>
impl<D> !Send for B2pulleyJointDef<D>
impl<D> !Sync for B2pulleyJointDef<D>
impl<D> Unpin for B2pulleyJointDef<D>where <D as UserDataType>::Joint: Unpin,
impl<D> !UnwindSafe for B2pulleyJointDef<D>
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