Struct nphysics2d::detection::joint::Anchor [] [src]

pub struct Anchor<N: Real, P> {
    pub body: Option<Rc<RefCell<RigidBody<N>>>>,
    pub position: P,
}

One of the two end points of a joint.

Fields

The body attached to this anchor.

The attach position, in local coordinates of the attached body.

Methods

impl<N: Real, P> Anchor<N, P>
[src]

Creates a new Anchor at a given position on a body local space.

If body is None, the anchor is concidered to be attached to the ground and position is the attach point in global coordinates.

impl<N: Real, P> Anchor<N, P>
[src]

The center of mass of the body attached to this anchor.

Returns the zero vector if no body is attached.