Update to nalgebra 0.29
This commit is contained in:
committed by
Sébastien Crozet
parent
13aebc4242
commit
57aec69c1e
@@ -4,7 +4,7 @@ use crate::utils::{WBasis, WDot};
|
||||
use na::SimdRealField;
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub(crate) struct VelocityConstraintTangentPart<N: SimdRealField> {
|
||||
pub(crate) struct VelocityConstraintTangentPart<N: SimdRealField + Copy> {
|
||||
pub gcross1: [AngVector<N>; DIM - 1],
|
||||
pub gcross2: [AngVector<N>; DIM - 1],
|
||||
pub rhs: [N; DIM - 1],
|
||||
@@ -15,7 +15,7 @@ pub(crate) struct VelocityConstraintTangentPart<N: SimdRealField> {
|
||||
pub r: [N; DIM - 1],
|
||||
}
|
||||
|
||||
impl<N: SimdRealField> VelocityConstraintTangentPart<N> {
|
||||
impl<N: SimdRealField + Copy> VelocityConstraintTangentPart<N> {
|
||||
#[cfg(any(not(target_arch = "wasm32"), feature = "simd-is-enabled"))]
|
||||
fn zero() -> Self {
|
||||
Self {
|
||||
@@ -40,7 +40,7 @@ impl<N: SimdRealField> VelocityConstraintTangentPart<N> {
|
||||
mj_lambda2: &mut DeltaVel<N>,
|
||||
) where
|
||||
AngVector<N>: WDot<AngVector<N>, Result = N>,
|
||||
N::Element: SimdRealField,
|
||||
N::Element: SimdRealField + Copy,
|
||||
{
|
||||
for j in 0..DIM - 1 {
|
||||
mj_lambda1.linear += tangents1[j] * (im1 * self.impulse[j]);
|
||||
@@ -62,7 +62,7 @@ impl<N: SimdRealField> VelocityConstraintTangentPart<N> {
|
||||
mj_lambda2: &mut DeltaVel<N>,
|
||||
) where
|
||||
AngVector<N>: WDot<AngVector<N>, Result = N>,
|
||||
N::Element: SimdRealField,
|
||||
N::Element: SimdRealField + Copy,
|
||||
{
|
||||
#[cfg(feature = "dim2")]
|
||||
{
|
||||
@@ -121,7 +121,7 @@ impl<N: SimdRealField> VelocityConstraintTangentPart<N> {
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub(crate) struct VelocityConstraintNormalPart<N: SimdRealField> {
|
||||
pub(crate) struct VelocityConstraintNormalPart<N: SimdRealField + Copy> {
|
||||
pub gcross1: AngVector<N>,
|
||||
pub gcross2: AngVector<N>,
|
||||
pub rhs: N,
|
||||
@@ -129,7 +129,7 @@ pub(crate) struct VelocityConstraintNormalPart<N: SimdRealField> {
|
||||
pub r: N,
|
||||
}
|
||||
|
||||
impl<N: SimdRealField> VelocityConstraintNormalPart<N> {
|
||||
impl<N: SimdRealField + Copy> VelocityConstraintNormalPart<N> {
|
||||
#[cfg(any(not(target_arch = "wasm32"), feature = "simd-is-enabled"))]
|
||||
fn zero() -> Self {
|
||||
Self {
|
||||
@@ -187,12 +187,12 @@ impl<N: SimdRealField> VelocityConstraintNormalPart<N> {
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub(crate) struct VelocityConstraintElement<N: SimdRealField> {
|
||||
pub(crate) struct VelocityConstraintElement<N: SimdRealField + Copy> {
|
||||
pub normal_part: VelocityConstraintNormalPart<N>,
|
||||
pub tangent_part: VelocityConstraintTangentPart<N>,
|
||||
}
|
||||
|
||||
impl<N: SimdRealField> VelocityConstraintElement<N> {
|
||||
impl<N: SimdRealField + Copy> VelocityConstraintElement<N> {
|
||||
#[cfg(any(not(target_arch = "wasm32"), feature = "simd-is-enabled"))]
|
||||
pub fn zero() -> Self {
|
||||
Self {
|
||||
@@ -213,7 +213,7 @@ impl<N: SimdRealField> VelocityConstraintElement<N> {
|
||||
) where
|
||||
Vector<N>: WBasis,
|
||||
AngVector<N>: WDot<AngVector<N>, Result = N>,
|
||||
N::Element: SimdRealField,
|
||||
N::Element: SimdRealField + Copy,
|
||||
{
|
||||
#[cfg(feature = "dim3")]
|
||||
let tangents1 = [tangent1, &dir1.cross(&tangent1)];
|
||||
@@ -243,7 +243,7 @@ impl<N: SimdRealField> VelocityConstraintElement<N> {
|
||||
) where
|
||||
Vector<N>: WBasis,
|
||||
AngVector<N>: WDot<AngVector<N>, Result = N>,
|
||||
N::Element: SimdRealField,
|
||||
N::Element: SimdRealField + Copy,
|
||||
{
|
||||
// Solve friction.
|
||||
#[cfg(feature = "dim3")]
|
||||
|
||||
Reference in New Issue
Block a user