[][src]Struct nphysics2d::solver::GenericNonlinearConstraint

pub struct GenericNonlinearConstraint<N: RealField, Handle: BodyHandle> {
    pub body1: BodyPartHandle<Handle>,
    pub body2: Option<BodyPartHandle<Handle>>,
    pub is_angular: bool,
    pub dim1: usize,
    pub dim2: usize,
    pub wj_id1: usize,
    pub wj_id2: usize,
    pub rhs: N,
    pub r: N,
}

A generic non-linear position constraint.

Fields

body1: BodyPartHandle<Handle>

The first body affected by the constraint.

body2: Option<BodyPartHandle<Handle>>

The second body affected by the constraint.

is_angular: bool

Whether this constraint affects the bodies translation or orientation.

dim1: usize

Number of degree of freedom of the first body.

dim2: usize

Number of degree of freedom of the second body.

wj_id1: usize

Index of the first entry of the constraint jacobian multiplied by the inverse mass of the first body.

wj_id2: usize

Index of the first entry of the constraint jacobian multiplied by the inverse mass of the second body.

rhs: N

The target position change this constraint must apply.

r: N

The scaling parameter of the SOR-prox method.

Methods

impl<N: RealField, Handle: BodyHandle> GenericNonlinearConstraint<N, Handle>[src]

pub fn new(
    body1: BodyPartHandle<Handle>,
    body2: Option<BodyPartHandle<Handle>>,
    is_angular: bool,
    dim1: usize,
    dim2: usize,
    wj_id1: usize,
    wj_id2: usize,
    rhs: N,
    r: N
) -> Self
[src]

Initialize a new nonlinear constraint.

Auto Trait Implementations

impl<N, Handle> RefUnwindSafe for GenericNonlinearConstraint<N, Handle> where
    Handle: RefUnwindSafe,
    N: RefUnwindSafe

impl<N, Handle> Send for GenericNonlinearConstraint<N, Handle>

impl<N, Handle> Sync for GenericNonlinearConstraint<N, Handle>

impl<N, Handle> Unpin for GenericNonlinearConstraint<N, Handle> where
    Handle: Unpin,
    N: Unpin

impl<N, Handle> UnwindSafe for GenericNonlinearConstraint<N, Handle> where
    Handle: UnwindSafe,
    N: UnwindSafe

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,