Struct nphysics3d::solver::GenericNonlinearConstraint [−][src]
pub struct GenericNonlinearConstraint<N: Real> { pub body1: BodyHandle, pub body2: BodyHandle, 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: BodyHandle
The first body affected by the constraint.
body2: BodyHandle
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: Real> GenericNonlinearConstraint<N>[src]
impl<N: Real> GenericNonlinearConstraint<N>pub fn new(
body1: BodyHandle,
body2: BodyHandle,
is_angular: bool,
dim1: usize,
dim2: usize,
wj_id1: usize,
wj_id2: usize,
rhs: N,
r: N
) -> Self[src]
pub fn new(
body1: BodyHandle,
body2: BodyHandle,
is_angular: bool,
dim1: usize,
dim2: usize,
wj_id1: usize,
wj_id2: usize,
rhs: N,
r: N
) -> SelfInitialize a new nonlinear constraint.
Auto Trait Implementations
impl<N> Send for GenericNonlinearConstraint<N>
impl<N> Send for GenericNonlinearConstraint<N>impl<N> Sync for GenericNonlinearConstraint<N>
impl<N> Sync for GenericNonlinearConstraint<N>