[][src]Struct nphysics2d::force_generator::Spring

pub struct Spring<N: Real> { /* fields omitted */ }

Generator of a force proportional to the distance separating two bodies.

Methods

impl<N: Real> Spring<N>
[src]

Initialize a spring attached to b1 and b2 at the points anchor1 and anchor2.

Anchors are expressed in the local coordinates of the corresponding bodies. The spring has a rest length of length and a stiffness of stiffness.

Sets the attach point to the first body.

The anchor is expressed in the local coordinatse of the first body.

Sets the attach point to the second body.

The anchor is expressed in the local coordinatse of the second body.

Trait Implementations

impl<N: Real> ForceGenerator<N> for Spring<N>
[src]

Auto Trait Implementations

impl<N> Send for Spring<N> where
    N: Scalar

impl<N> Sync for Spring<N> where
    N: Scalar

Blanket Implementations

impl<T> From for T
[src]

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Downcast for T where
    T: Any

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> Same for T

Should always be Self