[][src]Struct box2d_rs::joints::b2_pulley_joint::B2pulleyJointDef

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,
}

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

impl<D: UserDataType> B2pulleyJointDef<D>[src]

pub fn initialize(
    &mut self,
    body_a: BodyPtr<D>,
    body_b: BodyPtr<D>,
    ground_anchor_a: B2vec2,
    ground_anchor_b: B2vec2,
    anchor_a: B2vec2,
    anchor_b: B2vec2,
    ratio: f32
)
[src]

initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.

Trait Implementations

impl<D: Clone + UserDataType> Clone for B2pulleyJointDef<D>[src]

impl<D: UserDataType> Default for B2pulleyJointDef<D>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.