Struct nphysics2d::joint::MouseConstraint[][src]

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

A spring-like constraint to be used to drag a body part with the mouse.

Methods

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

Initialize a mouse constraint between two bodies.BodyHandle

Typically, b1 will be the ground and the anchor the position of the mouse. Both anchors are expressed in the local coordinate frames of the corresponding body parts.

Change the first anchor, expressed in the local space of the first body part.

Change the first anchor, expressed in the local space of the second body part.

Trait Implementations

impl<N: Real> JointConstraint<N> for MouseConstraint<N>
[src]

The maximum number of velocity constraints generated by this joint.

The two body parts affected by this joint.

Initialize and retrieve all the constraints appied to the bodies attached to this joint.

Called after velocity constraint resolution, allows the joint to keep a cache of impulses generated for each constraint.

Return true if the constraint is active. Read more

impl<N: Real> NonlinearConstraintGenerator<N> for MouseConstraint<N>
[src]

Maximum of non-linear position constraint this generater needs to output.

Generate the i-th position constraint of this generator.

Auto Trait Implementations

impl<N> Send for MouseConstraint<N>

impl<N> Sync for MouseConstraint<N>