From 15b165893c718a5606622b05b36f8041a429e30c Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Mon, 21 Feb 2022 21:19:30 +0100 Subject: Use WReal instead of SimdRealField everywhere --- .../solver/velocity_ground_constraint_element.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/dynamics/solver/velocity_ground_constraint_element.rs') diff --git a/src/dynamics/solver/velocity_ground_constraint_element.rs b/src/dynamics/solver/velocity_ground_constraint_element.rs index 8057030..06a727a 100644 --- a/src/dynamics/solver/velocity_ground_constraint_element.rs +++ b/src/dynamics/solver/velocity_ground_constraint_element.rs @@ -1,10 +1,9 @@ use super::DeltaVel; use crate::math::{AngVector, Vector, DIM}; -use crate::utils::{WBasis, WDot}; -use na::SimdRealField; +use crate::utils::{WBasis, WDot, WReal}; #[derive(Copy, Clone, Debug)] -pub(crate) struct VelocityGroundConstraintTangentPart { +pub(crate) struct VelocityGroundConstraintTangentPart { pub gcross2: [AngVector; DIM - 1], pub rhs: [N; DIM - 1], #[cfg(feature = "dim2")] @@ -17,7 +16,7 @@ pub(crate) struct VelocityGroundConstraintTangentPart { pub r: [N; DIM], } -impl VelocityGroundConstraintTangentPart { +impl VelocityGroundConstraintTangentPart { fn zero() -> Self { Self { gcross2: [na::zero(); DIM - 1], @@ -39,7 +38,6 @@ impl VelocityGroundConstraintTangentPart { mj_lambda2: &mut DeltaVel, ) where AngVector: WDot, Result = N>, - N::Element: SimdRealField + Copy, { #[cfg(feature = "dim2")] { @@ -89,7 +87,7 @@ impl VelocityGroundConstraintTangentPart { } #[derive(Copy, Clone, Debug)] -pub(crate) struct VelocityGroundConstraintNormalPart { +pub(crate) struct VelocityGroundConstraintNormalPart { pub gcross2: AngVector, pub rhs: N, pub rhs_wo_bias: N, @@ -97,7 +95,7 @@ pub(crate) struct VelocityGroundConstraintNormalPart { pub r: N, } -impl VelocityGroundConstraintNormalPart { +impl VelocityGroundConstraintNormalPart { fn zero() -> Self { Self { gcross2: na::zero(), @@ -129,12 +127,12 @@ impl VelocityGroundConstraintNormalPart { } #[derive(Copy, Clone, Debug)] -pub(crate) struct VelocityGroundConstraintElement { +pub(crate) struct VelocityGroundConstraintElement { pub normal_part: VelocityGroundConstraintNormalPart, pub tangent_part: VelocityGroundConstraintTangentPart, } -impl VelocityGroundConstraintElement { +impl VelocityGroundConstraintElement { pub fn zero() -> Self { Self { normal_part: VelocityGroundConstraintNormalPart::zero(), @@ -156,7 +154,6 @@ impl VelocityGroundConstraintElement { ) where Vector: WBasis, AngVector: WDot, Result = N>, - N::Element: SimdRealField + Copy, { // Solve penetration. if solve_normal { -- cgit