Struct nphysics3d::force_generator::Spring[][src]

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]

Apply forces to some bodies.

Auto Trait Implementations

impl<N> Send for Spring<N>

impl<N> Sync for Spring<N>