blob: b50cb766a64c0ecaa75f5026e81584bd7f0e504a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
use crate::math::{AngVector, Vector};
use na::{Scalar, SimdRealField};
use std::ops::AddAssign;
#[derive(Copy, Clone, Debug)]
//#[repr(align(64))]
pub(crate) struct DeltaVel<N: Scalar + Copy> {
pub linear: Vector<N>,
pub angular: AngVector<N>,
}
impl<N: SimdRealField> DeltaVel<N> {
pub fn zero() -> Self {
Self {
linear: na::zero(),
angular: na::zero(),
}
}
}
impl<N: SimdRealField> AddAssign for DeltaVel<N> {
fn add_assign(&mut self, rhs: Self) {
self.linear += rhs.linear;
self.angular += rhs.angular;
}
}
|